Difference between server-side and client-side?

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
barrowvian
Forum Commoner
Posts: 47
Joined: Tue Aug 19, 2008 3:49 pm

Difference between server-side and client-side?

Post by barrowvian »

Im new to Regex, and have been implementing some of it to my mini projects. One quick question though, and it'll probably sound really dumb...what is the difference between server-side validation and client-side validation? Is there any difference in the way they need to be written? And could someone please give me some examples of both types of validation, thanks
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Difference between server-side and client-side?

Post by califdon »

I don't know what "client-side validation" could mean, since the whole concept of validation is to refer to data stored on the server.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Difference between server-side and client-side?

Post by Benjamin »

Client side validation is done as a convenience to the end user. You can use javascript to check that a form was filled out correctly which will save the user a page load. Back when modems were common this was a much greater benefit than it is today to website visitors.

Client side validation is not a replacement to server side validation, which should always be done regardless.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Difference between server-side and client-side?

Post by califdon »

astions wrote:Client side validation is done as a convenience to the end user. You can use javascript to check that a form was filled out correctly which will save the user a page load. Back when modems were common this was a much greater benefit than it is today to website visitors.

Client side validation is not a replacement to server side validation, which should always be done regardless.
Thanks, astions. My mind was fixed on user authentication, but of course the question was about data validation, quite a different issue. I need another cup of coffee.
Post Reply