Meta-refresh doesn't work?

Viewed 79092

I have a page using something along the lines of

<meta http-equiv="refresh" content="0;url=http://example.com/" />

but for certain users on a certain workstation this doesn't work. The is in IE. Is there something wrong with cookies or a setting somewhere which would cause this to fail? I never heard of such a thing.

7 Answers

There is a security setting in internet explorer that does not allow meta tag refresh. It is under the Security tab, then choose Custom Level and the Meta Tag Refresh under Miscellaneous. If that is disabled, it would stop the meta refresh from working.

Aside from being able to disable it selectively, it is automatically disabled if you set IE's security level to 'High' [observed in IE9].

is it a really old version of IE? if so, try:

<meta http-equiv="refresh" content="0;url=http://example.com/"> </meta>

It needs a white space. HTML editor will complain, but just ignore it.

The META tag is not an empty tag and does not have a closing tag in HTML, only in XHTML. (If you are really are sending XHTML, it may not work right on older versions of IE anyway, there are only workarounds to send XHTML to older IE versions.)

Try:

<meta http-equiv="refresh" content="0;url=http://example.com/">

W3 Schools META Tag Description

You might also try:

  1. Checking the major and minor versions of IE. You can do this on the help->about menu option.
  2. IE has historically gotten all confused by filenames and MIMEtypes. Make sure that you are sending your HTML as an htm or html extension file, and that those filetypes are set up on your server to send text/html mimetype.
  3. Make sure your server isn't sending a conflicting meta refresh http header.

Just a wild guess: maybe there are some adblockers installed on those machines where the redirect does not work. Can't think of any other reason why this common technique works on some machines while it fails on others for you.

Related