What is a server-side scripting language

Difference between server-side and client-side programming languages

If you create a website with client-side program code, the disadvantage is that the processing of the program code can be prevented by the user. Because, theoretically, you could use client-side program code to carry out harmful processes on the user's computer. Therefore, all common browsers have the option of switching off the processing of client-side program code. It is advantageous that the technical environment of the user can be taken into account with client-side programming. If, for example, the server-side programming is used to query the server time and insert it into the website, but the user is not in the same time zone, the user would see an "incorrect" time. With client-side programming one could consider the user's time zone and display the "correct" time.

Another disadvantage of server-side programming is that the program code is only executed each time the website is accessed. In the case of a time query, for example, the current time of the server would be inserted, but no longer updated. The user would theoretically have to request the website every second to get the current time displayed. There are technologies (AJAX) to load data from the server without having to reopen the website. For this, however, the use of both types of programming (client and server side) is necessary and does not work if the user has deactivated the processing of client-side program code. The advantage of purely server-side programming is that you do not have to rely on the user to activate the execution of client-side program code. Because, the program code is processed on the server and that does not depend on the settings of the user. Server-side programming is used in particular for processes that must not depend on the user's settings and manipulation should be excluded.

For example, you could check the user input on a contact form with a client-side programming language and, for example, limit the length of the postcode to 5 digits. The problem with this is that the execution of client-side program code can be deactivated by the user. In this case, the user could, for example, deactivate the execution of the client-side program code and type 10 digits or even defective program code into the form field and send the form to the server. In such cases, client-side programming languages ​​are not recommended and the server must check what the user has typed in and in what form, and in the event of incorrect entries, further processing must be stopped with an error message. Since the user has no influence on what happens on the server, the possibility of incorrect entries or manipulation is prevented. The following is an overview that shows where the HTML and program code is executed.