Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Ante Vujčić
Ante Vujčić
11,306 Points

PHP vs JavaScript in algorithms

Hi, I can't say I know a lot about JavaScript and PHP but I do know more than basic stuff. However there is one thing I would like to find out so here we go. I do understand that JavaScript is client side language and php server side but what does that mean for example when you have some algorithms and calculations to do (more than a few), and you can write them in both languages but as I am aware when you use JavaScript client has to download JS file with those calculations (and all other stuff used t ocalculate) which means it is slowing load time of site, but does that mean that php actually does all calculations on server and sending only already calculated variables and does it speed load time in any way. Thanks