Solved

Form input validation

Posted on 2003-12-08
5
192 Views
Last Modified: 2010-04-06
A general question I would like to ask is that when we create web-based applications what sort of validations do you think is better?

What I mean is that should the validation be checked on the client side (using JavaScript?) or on the server side.
One of my colleagues argued that validating on the client side is better than on server side, because you don?t want to overload the server. However I said that you cannot rely on the client as you in some cases might not know your audience and your validation may fail, also JavaScript sometimes causes a lot of problems.

So I would like your comments on whether to validate inputs on the client side or server side.

ps. sites like EE, Yahoo, Hotmail they all do validations on the server side (plus point I think :))
0
Comment
Question by:glottis
5 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 20 total points
ID: 9902488
If you need data intergrety then the server is the only option. Anything done client side can be overridden by the user.

So use server side first, then consider saving bandwidth for you and the visitor by putting client side in as a secondary layer.
0
 
LVL 2

Author Comment

by:glottis
ID: 9902511
will wait for some more comments
0
 
LVL 8

Assisted Solution

by:nishikanth
nishikanth earned 20 total points
ID: 9902520
its better to the the validation on server side since the client side may feel if they have the disabled them.


http://www.asptechniques.com/content.asp?a=co&cID=949
0
 
LVL 2

Assisted Solution

by:kmalhotra
kmalhotra earned 20 total points
ID: 9904776
We usually find that a combination of client side and server side validations are the best. Somethings are checked on the client side and some on the server and some on both. The logic is that a client can disable the client scripting and bypass the validations so check them on the server.

But if the client-side scripting does work, then we know that we will save a round-trip.

Thanks
KM
0
 
LVL 2

Author Comment

by:glottis
ID: 9910532
thanks for the answer
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now