Skip to content
Learnearn.uk » A Level Computer Science Home » Client & Server Side Scripting

Client & Server Side Scripting

Serving Web Pages

How web pages are served

Web pages are served using a server – client relationship.

  1. The user enters the URL of the website/web-page to be loaded into a web browser. The browser looks in the computer’s DNS cache to see if a matching IP address is stored.
    If none is found then a request is sent to the ISP’s DNS resolver server to find out the IP address (NOT Found → step 2, found → step 4).
  2. The DNS resolver looks for the IP address and if it is stored the DNS Server returns the IP address to the originator.
  3. If it is not found it is passed on to a higher level DNS. Once found the original DNS caches the IP address for future use and returns the IP address to the user.
  4. The browser uses the IP address to send the web page request to the web server.
  5. The web server retrieves the page and sends it to the originator.
  6. The browser interprets the script and loads the page.

Tutorial Video

Can’t access YouTube? Click Here for the Google Drive version.

Client Side Scripting

Client Side Scripting

With client side scripting the script is executed on the client machine.

  • The code is embedded within the web page itself.
  • The code is interpreted by the web browser.
  • The most common form of server side scripting is JavaScript.
  • Any persistent data is stored on the client machine using Local Storage / Cookies

Activity

Try out some client side scripting here on the W3Schools Website

Server Side Scripting

Server Side Scripting

With server side scripting the script is executed on the server. The most common form of server side scripting is PHP

Any persistent data is stored on the server, usually in an SQL database.

Server side script execution process:

  1. The client’s web browser requests the web page page.
  2. The web server accesses the page/resource.
  3. The web server executes the code.
  4. The web server generates the web-page.
  5. The web server returns the page to the client
  6. The web browser displays the page

 

Resources