server-side scripting

What is server-side scripting?

Server scripts run on server side or database. Web browsers communicate with web servers using HTTP. When a HTTP request is made from web browser to web server, a HTML response is sent back from the web server to web browser. Server-side scripting means everything that happens on the server. Web browsers communicate with web servers through something called HyperText Transfer Protocol (HTTP). When you make any action with your browser, like entering some URL and clicking enter, an HTTP request is sent from your browser to the targeted server. After that, the server is waiting for a client-side request; this request is sent by something called a method like POST, GET, or DELETE.

Then, the server processes this request when it arrives and gives something called HTTP Response to the browser; this response holds a status line indicating whether the request succeeded or not (e.g. “HTTP/1.1 200 OK” for success).

The body of the response to a request would contain the requested content, maybe an image, Html page, or anything else. So, we can say that server-side scripting is executed and processed on the server.

The server accepts the request from the web browser or client’s computer, processes the request and return the result (requested file) to respective client that placed the request.

These are programs that run on a web server to generate dynamic web pages, creating a unique user experience for each user.

Main advantage over client-side scripting is that raw data is never transferred over the internet. All processing are done on web server.

Helpful in developing interactive website which involves database.

Suitable for more complex tasks with lot of processing power.

If any problem arises on server side fixed locally on the server.

Server-side script:

Server-side script is a program that is executed on server side when user requests information. Script do not download at client side.

When the client or visitor requests the page, the web server reads it first. After reading, the web server locates the page file on the disk, loads into memory and asks the script engines (or interpreter) to process the script code. After processing, web server generates the HTML page and pass back to the server. The browser processes the client side script along with the HTML

web page from the server and display the web page on the client’s computer screen.

Server-side means ““Happening during the internal processing a server performs as it tries to serve a page back to a client who’s requested it.”

PHP and MySQL are always server-side scripting language. Web browser don’t understand them.

Back end is used as synonym for server-side scripting.

Server side scripting

Differences from Client-Side Scripting:

  • Server-Side Scripting is used in the back-end, where the website’s source code is hidden at the client-side. On the other hand, client-side scripting is used at the front-end, which users can see from their browser.
  • When a server-side script is run, it sends a request to the server. Client-side scripting, on the other hand, does not require any server interaction.
  • HTML, CSS, and JavaScript are examples of client-side scripting languages. Programming languages such as PHP, ASP.net, Ruby, ColdFusion, Python, C#, Java, C++, and others, on the other hand.
  • Server-side scripting helps personalize web pages and make dynamic changes to websites. On the other side, the client-side script will effectively reduce the load on the server.