html - Check if javascript is enabled in browser -


i have code checks if js enabled , redirects:

<noscript><meta http-equiv="refresh" content="0;url=http://www.domain.se/act.html"></noscript> 

however, wonder if se friendly...

this because have added website url yahoo recently, , instead of title appearing in search results, text "aktivera_javascript.html" above appears. why that?

thanks

update:

if code above isn't proper checking js availability, other method should use instead?

the noscript tag user agents can't execute script. since yahoo! spider 1 of agents, guess (but can't certain) respects content of noscript tag , therefore http-refresh directive contained within. result thinks site lives @ http://www.skuffen.se/aktivera_javascript.html, , displays content in search results.

to fix issue suggest either:

  1. use progressive enhancement ensure basic content available without javascript, , layer advanced features on top. user agents without javascript won't know different, , richer experience.
  2. simply use noscript tag warning rather full redirect page, see how check browser's javascript enabled or not.

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -