Solved

Form input validation

Posted on 2003-12-08
5
194 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

773 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