Jump to content

Detecting compatibility


Azu

Recommended Posts

the noscript html tag will show whatever html is in it if there is no js or if js is turned off:

<noscript>Please turn javascript on in your browser to use this web site</noscript>

only runs when the page is parsed by the browser though.

 

The only way the server can know whether the client has js on or not is by first loading  a page into the client and then communicating it back to the server like through a meta refresh(yuck).

 

Bottom line - no information about whether js is on or not is sent to the server in the headers in the request from the browser to the server! It ain't in there.

  • 4 weeks later...

Thanks ^^ the whole reason I am planning on using javascript though is to save bandwidth. I want to use external javascript to show my navigation menu, so it doesn't need to be downloaded over and over (which it should only do if javascript isn't supported) so I'd really appreciate it if there was some way to tell whether or not the client supports javascript. I guess I could include a javascript in every page that sends something to my server, and check on every page view if it was received or not, and store all the results in a mysql table, and then query the mysql every time a page is loaded to know whether or not javascript is supported, but this would put more load on the server, so I am looking for a way to quickly tell if it is on or off.. :o

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.