Jump to content

Meta Refresh: Is it Safe?


Fluoresce

Recommended Posts

I need to redirect after a short delay of about ten seconds. I am going to use a meta refresh, thus:

 

<head>
<meta http-equiv="refresh" content="10; url=http://www.mysite.com">
</head>

 

Are meta refreshes safe? In other words, are they compatible with all major browsers? Might it not work in some instances?

Link to comment
https://forums.phpfreaks.com/topic/181172-meta-refresh-is-it-safe/
Share on other sites

Thanks, Haku.

 

I've put the code right at the top of the document, even above the doctype. It seems to be working fine.

 

I'm using it with the understanding that it's safer and more compatible than a meta refresh.

 

Are you certain that it works in all major browsers? Does it even work in Opera when redirecting is disabled? Are there any drawbacks with it at all?

 

I appreciate the help very much.

Honestly, I haven't used it in three or four years, and I wasn't testing on Opera at the time, and I may not have even tested in on all the browsers that I was using at that time, so I couldn't say for sure. It should be more stable/compatible, as it's server based rather than browser based, but you'll have to test it out to find out for sure. Let me know your findings.

Thanks for the replies, man.

 

One last question for anyone who can answer - and it might be a stupid question at that . . .

 

Can meta tags interfere with the PHP refresh code if they include the attribute http-equiv? From what I understand, this attribute sends a HTTP header, too.

 

(As you can probably tell, I don't understand this aspect of Web development very much.  :shrug:)

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.