Houssam
Houssam

Reputation: 135

Using Client Side Scripts for validations?

I'm making an asp.net/c# web application and i would like to know is Client Side Scripts for validations enough and secure using js ? what do you think and what do you suggest ? thanks

Upvotes: 0

Views: 237

Answers (3)

Chris
Chris

Reputation: 8422

You can't rely on these as users can simply turn off Javascript. ALWAYS PERFORM SERVER SIDE VALIDATION!!!

Upvotes: 0

Quentin
Quentin

Reputation: 943579

Using client side scripting for this is essentially asking the client to check that the user who controls the client isn't doing anything bad.

It is very convenient for users who did bad things by accident but no defense at all against users trying to do bad things deliberately.

Do all your checks server side, then consider adding extra client side checks to speed things up for the users.

Upvotes: 2

Darin Dimitrov
Darin Dimitrov

Reputation: 1038850

Client Side Scripts for validations enough and secure using js ?

No, client side validation only is not secure enough as users can disable javascript. You need to perform at least server side validation. Client side validation is only for convenience, avoid sending values to the server and preserve bandwidth, responsiveness of the UI, ... but not for security.

Upvotes: 3

Related Questions