Difference between server side and client side

Posted on 10. Dec, 2007 by tutorials007 in Archive 3,731 views

Difference between client side and server side.

Server side
Server side script are processed at server after server get request for a PHP document.
After request for an PHP document was sent, server is processing PHP code and it generates HTML code that is sent to a client.
This means that page which client sees doesn’t exist anywhere on the server in such form.


Client side
Main an most used language of client side group is JavaScript.
Code written in Javascript is often included in an basic HTML code and it’s executed at the client explorer.
This kind of code is visible to everybody.

Let me show you examples:

Client side

<script language=”JavaScript”>

var v = new Date()

document.write(v.getHours())

document.write(“:”)

document.write(v.getMinutes())

document.write(“:”)

document.write(v.getSeconds())

</script>

and

Server side

<?

$time= date(“H:i:s”);

echo $time;

?>

10 Responses to “Difference between server side and client side”

  1. music

    08. Jan, 2008

    very interesting.
    i’m adding in RSS Reader

  2. tutorials007

    08. Jan, 2008

    thanks bro!

  3. kia

    25. Nov, 2008

    hi everyone!
    honestly im still confused about the difference btw server-side and client server.
    i red many tutorials but still nothing, what i end up undrestanding is that,in the server-side (php) the code is not visible like in the html case, and the client server the code is visible to anyone.:(
    i m just lost…
    any help? for more details….i will be so thanksful…

  4. popeto.NS

    11. Apr, 2009

    so client-side using javascript and server-side use php, is it true?

  5. shaveen

    10. Jun, 2009

    Thanks a lot………………….

  6. kshitij S. Nirmaley

    27. Jul, 2009

    In the simpliest form I have answer about client side and server side. A.Server side:- The server side means all the code and processing is done on the server.e.g. PHP, ASP,ASP.net
    B. Client Side :- menas the code which will display or process on the users browser It is called Client Side. Mostly JavaScript and VBScript are used for the client side. Mostly validations are done to the client side. That means whenever user insert a value the value will be check to the client side because the server must store the correct and accurate values. If this processing is done on the server it will take a lots of time to process. i.e. each time user insert a wrong value the page goes to the server all the value check and again inform the user that insert the right value. so Client side help the user to save the time. But for the web developer you must care of both the scripts client side scripting and server side scripting. I think this will help you to develop a web site.
    further queries are always welcome.email id: k_nirmaley@yahoo.co.in
    take care… bye bye
    Kshitij S. Nirmaley
    (Technology Specialist and WEB DEVELOPER,INDIA )

  7. Prabhkirat

    06. Oct, 2009

    It is nota satisfactory Answer I guess

  8. kshitij s. nirmaley

    07. Nov, 2009

    The server gets the request from the client side. All the processing is completed on the server side and that particular request the response sent by the server. Means for every request there should be a response and every response there should be a request.
    For the server side there are various languages used e.g. PHP,ASP,ASP.NET etc. etc.
    For CLIENT SIDE: JSP,VBSCRIPT is used.
    Both the client side and server side languages are very important to develop websites.

    When server gets the request he execute the code and transfer the code in to the HTML(HYPERTEXT MARKUP LANGUAGE) format.The server side code is not visible to every one.
    e.g. login form: you enter the username and password. the code is executed to the server and send you to another page. but you did not fill up the value in the password and click on enter this code execute on the client side.

  9. kshitij s. nirmaley

    07. Nov, 2009

    and gives you the error. client side prevent the user to insert the wrong input.

  10. unknown

    12. Nov, 2009

    “For CLIENT SIDE: JSP,VBSCRIPT is used.”
    I think this should be
    “For CLIENT SIDE: Javascript,VBSCRIPT is used.”
    Because JSP is also server side language

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes