Client side vs Server side scripting
There is some different between server
side and client side scripting which makes it hard for when you would use one
or the other. Sometimes client side scripting will be the best ones of
implementing a feature on a website, but server side scripting needs to be considered
on a case-by-case basis.
An example of client side scripting
could include validation, animation or even applying styles to your website.
Client side scripting can be used to save web servers processing power, as the user’s
computer will be able to process the instructions for an animation easily.
Client side scripting means that the style of a web site can be changed without
the user needing to refresh the page, if they was to do this with the server
side it would need to be refreshed for it to work.
Examples of server side scripting would involve
complex calculation, database querying this would mean inputting data and also
updating data in the database. This can also be done on client side scripting
but it is more difficult this is why it is done using the server side. It is
best using server side as the server can tell what processing power the users
computer is capable this means that it is able to run the complex calculation
or not. This is why it is better to run it on a server as the developer is
assured that the server is processing the power and it is capable of running
user viewing the webpages source. This means that a hacker could hack though
passwords. With server side scripting like the shopping cart it is
able to put things in there and it will be saved this is used by cookies which
save parts of the web pages you have been on and most web sites you this. The
information you have inputted or the product you have put in the shopping cart
will be saved to the server so it remembers what you have put in there.
The main advantage of using client side
scripting is that its response time, this is because the script is processed
locally on the computer. This makes it much quicker to act then the server side
where the request from the user would need to be sent to the server to then be
processed and then have to be sent back. This means that it takes a lot of time
and then it depends on the upload and download speed of the users Internet.
The client side scripting can be
bypass form validation. Server side scripting doesn’t have this as a weakness
as the code is executed before it reaches the user. This means that the form
validation should be done by both client side and server side scripting
time to any validation error
With server side language it can be used to recheck the
The main advantage of server side scripting is that it
doesn’t need to use plugins weather client side needs plugins for it to work.
With server side it doesn’t need this as the server does all of it for the
user. Client side does this using the plugins and freeze the computer or slow
down the CPU. Another main advantage is that its offer a grater protection then
client side. This is mainly used for social media site and e-commence site as
the protection is very good.
A disadvantage of server side is that for it to show
dynamic pages it needs to be refreshed so that the user is able to see these
features without the page been refreshed. Another disadvantage is that if the
webpage has a lot of traffic this can cause a heavy load on the server this
means they need to utilise the method such as could hosting.