provided by: 
Originally published at Internet.comI receive an excessive number of questions asking for help and asking how to do certain coding tasks. One question this week caught me by surprise. In a prior article, I presented a method for separating the scripting code form your actual HTML file. This raised the question about running the javascript on the server rather than on the client so that the client could not see the code. This question raised a critical issue for understanding Web programs to understand the different types of Web applications that can be created, you should understand the difference between client-side and server-side code.
Web pages are displayed in your browser on your local machine. Just like a customer or client for a restaurant, you and your browser are a client using a Web site. The Web site is displayed by your browser, which interprets code that was sent to it. In general this code will be primarily HTML, but may also contain anything supported by your browser such as javascript, flash movies, and more.
The machine where the Web site actually resides is called a Web server. When you send a request for a Web page by entering a Web site address, this request is sent to a Web Server. The Web server then sends the Web page to your browser. The interesting thing about a Web server is that it can manipulate the code within a Web page before sending it to your browser. For most Web pages, no manipulation is done. Rather, the server simply sends a copy to the browser and the browser does the work of displaying the code...
Read article at Internet.com site