I noticed something interesting while testing the client side validation on a website that used jquery document.ready event.
If I loaded the login page with js disabled its noscript tag redirects the user to a different page informing that the js support wasn’t enabled on the browser.
If I loaded the login page with js enabled, and then proceed to disable it, the code attached on its document.ready event was still running and validated perfectly the empty inputs in its login and password fields.
Since I didn’t see the page requesting to the server to perform such validation I wonder if its correct to assume that the fact that js was initially enabled was enough for the document.ready to run and attach the code permanently no matter how I toggle the js support afterwards? or Maybe I missed something?.
Thanks for the insight you all can give me.
“Disable javascript” would actually be closer to reality if called “Disable js from now on”. Everything that was executed before disabling, well, was executed. Everything that would have happened after the disabling (such as timeouts, intervals, etc), is no longer executed.