1

I can't get...

<?php
   header( "Refresh: 5; URL=http://www.mywebsite.com" );
?>

...working in Internet Explorer (damn you!).

It works great in Chrome and if I use...

header("Location: http://www.mywebsite.com");

...it works in both, but I get no delay.

j08691
  • 204,283
  • 31
  • 260
  • 272
Oskar Persson
  • 6,605
  • 15
  • 63
  • 124

1 Answers1

4

Try including it as a meta tag, or reloading via JavaScript.

Meta tag:

<meta http-equiv="refresh" content="5;URL='http://example.com/'">

Javascript:

window.onload = new function() {
  setTimeout(function() {
    location.reload();
  }, 5000);
};
Oliver Spryn
  • 16,871
  • 33
  • 101
  • 195
  • Thanks! Though I ended up with location.href = "http://www.mywebsite.com" instead since I wanted it to redirect and not refresh :) – Oskar Persson Aug 07 '12 at 20:57