phpstuff Posted October 14, 2013 Share Posted October 14, 2013 This book uses JS - what are the use cases and pros/cons of each? (in addition to PHP server side validation of course) I understand users can disable JavaScript... Can HTML5 validation be thwarted like JS? If not, is it then better? Isn't HTML5 approach less taxing from a resources perspective? Thanks! Link to comment Share on other sites More sharing options...
HartleySan Posted October 14, 2013 Share Posted October 14, 2013 HTML5 validation is only performed in newer browsers that recognize it. It's completely ignored in older browsers. JS validation will run in any browser that has JS enabled, but JS can be easily disabled in most browsers and because all JS code is client-side, any user can view your JS validation and try to find ways around it. The best COA is to do all real validation on the server-side. That's not to say that you can't use client-side validation for a more responsive experience, but you should never rely on only client-side validation. 2 Link to comment Share on other sites More sharing options...
phpstuff Posted October 14, 2013 Author Share Posted October 14, 2013 Perfect, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts