This question already has an answer here:
I am new to front end web development and am making a small application where I want to validate that the user has in fact entered a valid URL.
At first thought I figured I should solve this using js but what if the user has js turned off?
Should I instead use HTML5 form validation techniques? Or maybe use both?
I know I could do server side validation but my question is mainly if HTML validation is used in real life applications b/c of possibility of js being turned off? Thanks for the help.
Best How To :
but what if the user has js turned off?
The same could be said for HTML5 - what if the user is using a browser which doesn't support that?
If you're wanting to process data on the server-side you should always perform server-side validation. Front-end validation is primarily used for reducing server load and making things look smoother. It can be very easily bypassed.
The noscript element represents nothing if scripting is enabled, and represents its children if scripting is disabled. It is used to present different markup to user agents that support scripting and those that don't support scripting, by affecting how the document is parsed.
– HTML5 Specification: The