Client Side vs Server Side

In most cases of web development world we may come across the two terms frequently:

  1. client side
  2. server side

In reality, these two terms are not at all complex to understand. Very simple. As the name says client side is the computer system which a client is using. Who are the client? The one who is visiting a website. Server side is the computer system, where all the files, database of a website are kept.

Lets take one example. is a website which provides information on html, php, jquery etc.

So how do people visit this website?

People type the url of this website in the browser, then the website loads into the browser.

Here people are the client, and the computer system which the people are using known as client system.

Where are the website files located?

In the server. Server is computer system with large memory. contains lots of webpages such as one webpage provides information about html bold text, another webpage provides information about adding image into webpage etc. So where are all these files located? In the server.

Lets move one step further. Lets take login process into consideration. 

So when a client, logins in to, what happens exactly?

Two steps performed.

  1. Client provided information are in proper format or not. (Provided email is in proper format, provided password is not blank or is not long in length)
  2. Email exists in the database record or not. If yes, email and password matches in the database record or not.

Lets analyse above two steps in detail. Where the checking of provided email and password is whether in right format or not take place?

In the client side system.

Who is checking the provided email and password is in right format or not?

There must be a script at the client side, which must be checking.

What is this script called?

This script is called, client side script. Client side script can only work in a client system. Thats why such script is known as client side script. So, client side script checks the user provided information are in proper format or not.

Okay, now the gathered login information is proper format, then what?

Then the client side script information is forwarded to another type of script which checks whether email is registered or not, if registered then email and password matching with the database record or not.

Now, where the information validation is taking place?

It is taking place in the server.

Who is taking care of the validation process?

Another kind of script inside the server, takes care of the validation process. Such script are known as server side script.

Are such scripts available by default?

No. Its duty of the web developer to create client side script and server side script individually.

Which scripting language is used to create client side script?

Client Side Script:


Which scripting language is used to create server side script?





Lets plan roughly on a paper, what would be the process of  query submission through contact us webpage?

Suppose you are providing a contact us webpage in your website. People may want to contact you through this webpage. In this webpage people need to provide their email, subject of their query and details of their query, then they need click on the submit button. So What are the scripts and html pages you may need to execute the process? (If you are new, does not matter. Just try to figure out the work flow).

Try yourself for a while, then return back to this webpage and read the solution below.

Step 01: We need to create a webpage, where user can provide their email, subject of their query and details of their query. This webpage can be developed using HTML.

Step 02: We need to check whether user has provided email, a subject and proper details or not. If any of the field is blank, then we need to inform the user about it. If the user has filled all the fields, and it is in proper format, then we need to forward the information to the server. Who is going to take care of checking whether email is in proper format or not etc. A javascript file. A javascript file is going to check the provided information are in proper format or not.

Step 03: Once the javascript checks the user provided information are absolutely correct, then it sends the information to another script, which is going to store in the database. Such script can be developed using PHP. Once the information is stored in the database successfully then, the php script is going to inform javascript about this successful storing and then the javascript is going to inform the user about the successful storing of the query.

Note: JAVASCRIPT cant communicate with the server directly. Rather it could pass information to a php script and collect information from php. 

The above mentioned steps  takes place in the case of query submission through contact us webpage.

For such process, we need one html file, one javascript file, one php file.

Now, where all these files are stored?

In the server.

Which files are going to load in the client system if a client visits the contact us webpage?

HTML file and javascript file.

NOTE: PHP file is always remains in the server only. It never loads to the client system. PHP is a server side scripting language. It is going to stay in the server only.


I own this website So what I did? I did three things.

  1. I registered the domain first.
  2. I purchased a server
  3. I developed all the required files (php, javascript, html) and placed those files in the server.

Placing website files in a server is known as hosting. 

With out hosting, no one can visit the website. Once I hosted my website, any one can visit the website with its url.

NOTE: FOR LEARNERS, purchasing server can be bit expensive. So are there any alternatives, so that we can use our computer system as server and practice as much as we want with out paying a single penny? Yes there is an alternative – XAMPP SERVER

Using this software we can use our own computer system as server. Visit following link, to know how to install xampp server in a computer system and how to use it.