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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

noscript Tag 2

Status
Not open for further replies.

glenmac

Technical User
Jul 3, 2002
947
CA
Hi I've put a noscript tag on my site for those that have scripting turned off. I have a meta redirect tag in the noscript.
Code:
<noscript><meta http-equiv="refresh" content="2;url=http://www.lantzvillecomputers.com/DefaultFF.htm"></noscript>
It works fine. I have the tag in the body of the document. Is this correct syntax? Or should I put the noscript tag in the head of the document? I'm confused as I know a meta redirect is supposed to be in the head and the noscript should be in the body ( I think)

Glen
 
AFAIK, noscript can be in either the head or the body - in the same was a script can be in either the head or the body.

Hope this helps,
Dan

P.S Good to see you've fixed the Fx version of your website - I visited the other day and was getting numerous JS errors with the 'sliding' menu.



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
it's also worth noting that if you place it in the body, especially at the botom, OPERA will display it even though JS is enabled.

It's a stupid little bug Opera seems to suffer from, i got round it by merely adding some JS to hide it again, which obviously will work if JS is on, and display the noscript content otherwise, which is the desired effect.



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

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Hmm wonder if it's worth the extra codng. Opera = 2.2% of the market last I looked.

Well if you think 2.2% of 100 million users isn't worth 1 line of code
Code:
document.getElementById('noscript').style.display='none';
Who am I to argue!

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

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
;-) lol - no probs.. glad to help!

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

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top