Server
The Server is responsible for serving the web pages depending on the client/end user requirement. It can be either static or dynamic.
Client
A client is a party that requests pages from the server and displays them to the end user. In general a client program is a web browser.
Script
A script is a program or sequence of instructions that is interpreted or carried out by another program rather than by the computer processor.
Server Side Scripting
Server side scripting is used to connect to the databases that reside on the web server. Server side scripting can access the file system residing at the web server. Response from a server-side script is slower as compared to a client-side script because the scripts are processed on the remote computer.
Client Side Scripting
Program that execute on client side ,by the web browser instead of server side. Upon request, the necessary files are sent to the user's computer by the web server on which they reside.
Advantages of server side scripting
It does not require the user to download plug-in like Java or Flash (client-side scripting). Your scripts are hidden from view. Users only see the HTML output, even when they view the source.
Working of both sides
- The user opens his web browser (client side)
- The user starts browsing
- The client forwards this request to the server, for accessing their web page.
- The server then acknowledges the request and replies back to the client program.
(An access link to that web page)
- The client then receives the page source and renders it.
(Into a viewable/under a stable website)
- Now the user types into search bar
- The client then submits data to the server
- The server processes the data and replies back with a related search result
- The client again renders it back for the user's view
- The user gets access to the requested link.
Scripting and Facebook
Facebook is completely dependent on javascript you can verify it by turning it off from browser settings>content management.
Javascript is the only accepted way to do client side programming in a browser. It is a standard of sorts accepted by all browser vendors.
Do we need Javascript always to run a web site?
No. There was internet (world wide web) before javascript. It used to run on HTML.Documents were linked and you could navigate through the links.
How does Facebook work with Javascript disabled?
Well all the major web application(web sites) that are built are advised to have a fall back mechanism , when the javascript is disabled. It is among the good practices that must be followed. You never wanna disappoint a customer , even if his/her browser's Javascript is disabled. Also it will help you in SEO. As web crawlers cannot crawl through javascript.
And not all things work with facebook when javascript is disabled.
You wont see any pop ups , no picture preview modals , videos would open on a different page. And the seem less interaction that is offered by facebook is replaced by the age old "Click and wait for the response" method.