What is the difference between client-side validation and server-side validation?
What is the difference between client-side validation and server-side validation?
Client-Side Validation: - In the client-side validation method, all the input validations and error recovery process is carried out on the client-side i.e. on the user’s browser. It can be done using JavaScript, AJAX, VB Scripts, Python, and Perl, etc.
Here
the validation process works without sending data to the server for processing.
Example:-
Suppose
you want to validate whether a user-entered email is in the right format.
Server-Side Validation:
- In
server-side validation, all the input validations and error recovery process is
carried out on the server-side. It can be done using programming languages like
C#.NET, Java, etc.
Note: - Client-side validation
is faster than server-side because the validation takes place on the client-side
(on a browser) and the networking time from client to server is saved.
Server-side validation is more secure than the client-side as the user cannot see the code even he does a view-source.
Comments
Post a Comment