When we talk about web languages, we normally define them by being either client or server side. This is based upon where the script will run, or as it is sometimes called – execute.
Client Side Languages
A client side language runs on the end users machine. JavaScript is the most common client side language. It (most of the time) runs only in the end user’s browser.
Client side programming is at the whim of the end user, as they can disable JavaScript, have a browser that doesn’t support all that you are doing, etc. This means we can’t always trust the end user to see what we want it to see. However, it also means that we can test to see if it is working, and let the end user know that they need to enable JavaScript.
JavaScript is found in all major, modern web browsers. Additionally, there has been a lot of updates to the processing engine for JavaScript, to improve its performance. So it is a good language to run/use.
This means that the end user has to allow the script to run, and the server has little to no knowledge of the script running. Because it doesn’t involve the server resources, the server can serve more user requests, faster.
Note: I say most of the time, which you can read 99.9999999% of the time. Those that don’t are special cases and require special setup. This won’t happen in a normal environment.
Server Side Languages
A server side language runs on the server. PHP, ASP.Net, JSP, and Python are examples of server side languages.
Server Side Languages run on the server, before it is sent to the end user. The end user only gets HTML code, so it has nothing to do. If a site is real busy, it will slow down the server, as it has to do all of the processing.
The advantage is that it doesn’t matter how your user is configured, the script will still do it’s job. Additionally, because you know about your server, it makes it so you don’t have to worry about testing on multiple browsers, OSes, etc.
Also, a Server Side language cannot perform any action on the client – so no rollovers, etc. No direct interaction with a user when they click on a button.
Combining Both
Most modern websites end up using a combination of both server and client side programming. Each one should be used to their respective advantage, to make the most of the situation.
Server Side vs. Client Side Programming was originally found on Access 2 Learn