Asked in
JavaScript
Web Design and Publishing
Web Programming

Difference between client side scripting and server side scripting with example?

Answer

User Avatar
Wiki User
July 15, 2009 10:12AM

Server side scripting is when the users browser makes a request back to the server and the script creates the dynamic page based a number of conditions. Languages usually used are PHP or ASP. Example: On a website and the user clicks on the show the products link. The server then runs the PHP/ASP code to create a page by finding all the products in the data base. The page is created and sent back to the users browser for viewing. Client side scripting is when all the code is already on the users browser and the page alters based on the users input. Language is usually JavaScript. Example: A JavaScript drop down menu. The JavasScript alters how the menu is displayed but all the code is run locally while it is doing it.