Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JavaScript Disabled

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
I have seen in the CSS/HTML forum post constantly going on about how a solution posted will only work if JS is enabled.

I appreciate not all devices will have a JS enabled browser, but generally speaking the average user wouldn't switch JS off and is using a half decent browser.

However, I'm curious as to what events are available to you and what actually constitutes as JS.

If JS is turned off, does that mean not one event will be fired, ie. onmouseover, onclick, onkeyup etc... is this JS functionality or standards browser functionality and even if the events are still triggered, what would you actually be able to do with the events if not using JS in some form?

thanks 1DMF

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
None of the events will fire without javascript being enabled so you will have no mouse or click events, no onload or onsubmit, etc. And even if they did work, as you surmise, there would be nothing for them to trigger as no code would run.

As for "decent browsers", that is not really the question.
A lot of people turn off Javascript or have security products that turn it off for them as a matter of online security. The last estimate I read was that about 10% of internet users have disabled Javascript which is no trivial amount. You could argue that if they want to make use of yoru site they MUST enable Javascript but that really depends on what your site is for/about.
At the minimum if your site relies on Javascript for any major functionality then you should at least detect the lack of Javascript capability and warn them accordingly.
If keeping the site usable for non-enabled browsers then careful thought should be given to making the site work without Javascript or at least processing the pages differently if it is not available.


At my age I still learn something new every day, but I forget two others.
 
so basically with it turned off you have a browser that's a lame duck.

I do notify people they need JS to use the site, but would not concider ever writing a site that works without it.

Rich Content DHTML sites are the way of the future, if security is an issue then JS and the browser needs to be secure enough that nothing untoward can be done with JS.

Switching it off is not a solution, but some obviously think it is.

oh well , I guess the same can be said for Flash, QuickTime and other types of sites, I guess personal preference is the key.



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Not having Javascript is restricting but it is more of a convenience than anything else. You can still do your main tasks via server-side code and reloading the page as needed but it is a nuisance and detracts from the ease of use and smoothness of the site.

As for security, Javascript like any other technology is not designed to be insecure but weaknesses can sometimes be found and exploited like in anything else. Why does Windows have to be patched so often? If writing something totally secure were easy we would be in a totally different world right now.

At my age I still learn something new every day, but I forget two others.
 
theniteowl said:
If writing something totally secure were easy we would be in a totally different world right now.
And what a wonderful world it would be!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top