Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,
It seems to be very primary question to ask in this forum but I can't clear my doubts by googling all the day. All articles states that server side validations are mandatory even if client side validations are properly placed. We can not relies on client side alone because user may disable javascript on client side. But if I write same validations on both sides, then performance is degrades as same validations executes twice first on client side & then on server side. How to target this issue.

What I have tried:

After googling for whole day, I learnt that always write validations on server side for better reliability and security. But I afraid that it will impact on application performance.
Posted
Updated 20-Apr-17 5:25am

The performance does not degrade. You should do server side validations no matter what. Client side validations are a nice to have to make it more responsive to the user. So, if you are going to skip 1, skip client side.

But it does not affect performance. Client side validation executes in the client's browser and should be very fast. If it all passes then the form is submitted as a separate process and validation happens there.
 
Share this answer
 
Comments
Umesh AP 25-Apr-17 5:53am    
Thanks RyanDev. I am littile bit confuse about performance issue.
ZurdoDev 25-Apr-17 6:49am    
What do you mean? What are you confused about?
Umesh AP 25-Apr-17 7:37am    
Hi RyanDev, Sorry for my poor english. I want to say that previously I am confused about performance but after reading both replies, my doubts are cleared now.
ZurdoDev 25-Apr-17 7:56am    
OK. Good.
ZurdoDev 25-Apr-17 7:57am    
You are less confused. That makes sense. ;)
It'll add a few milliseconds onto the page request, such a small amount of time that the client won't even perceive it and given the importance of validation that's a few milliseconds people don't mind adding.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900