Solved

Will meta redirect work outside of html header section?

Posted on 2012-04-09
7
919 Views
Last Modified: 2012-08-13
<meta http-equiv="Refresh" content="5; url=http://www.quackit.com/html/tags.cfm">

Can I put this at the begining of my html body tag section?  I thought I've see this outside of the Header section and it still work.  thank you.
0
Comment
Question by:lapucca
  • 3
  • 2
  • 2
7 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 37824348
But why do you want to put it in body tag, when it works in head tag?
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 250 total points
ID: 37824359
another way to do the same thing would be put a timer event in the script tag

<script>
  setTimeout(function(){
   location.href = location.href;
}, 3000);
</script>

you can add above snippet anywhere in the html document, and it will simply reload the current page every 3 second
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 37824360
Even if it works, it belongs in the <head> section.  Why do you want to put it somewhere else?  Any function that is looking for it is looking in the <head> section.  Browsers and servers don't have to pay attention to code that is not formatted right although they often try to make it work anyway.
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 

Author Comment

by:lapucca
ID: 37825406
We're using CMS system.  For some pages I want to redirect.  I don't want to put it at the header of the common master page.    But isn't it a common practice to put in a redirect message in case the redirect doesn't work out in like a minute or 2?  Maybe it's because of type of browsers issue?
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37825438
No, it's not a common practice.  Never seen it.
0
 

Author Comment

by:lapucca
ID: 37826132
I meant, a common practice to put in a web page with message to click somewhere in case the redirect doesn't take place.  I see that several times before.  I'm sure you have too.  

Anyway, back to the meta tag for http-equiv.  Would that work if I put in outside of the header section and as part of the body section?  Thank you
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37826563
The only place I have seen anything like that is for downloads.  I guess I don't know about the redirect because I've never done it that way.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now