Welcome Guest, Not a member yet? Register   Sign In
Why does URL Helper support unofficial HTTP header REFRESH?
#1

[eluser]ray023[/eluser]
Last week, I composed a long and, IMHO, rather confusing post regarding a Blank Page loading in my application; with no obvious errors logged or displayed. The peculiar thing was that the blank page only occurred on my client's network.

The piece of code that turned out to be the culprit was in the URL helper:

Code:
case 'refresh'    : header("Refresh:0;url=".$uri);

I took CodeIgniter out of the picture and created my own php script that looks as follows:

Code:
<?php
if (headers_sent()) {
  die('cannot send location header (anymore)');
}
else {
  header("Refresh: 0; url=http://www.google.com"); //This does not work
  //header("Location: http://www.google.com"); //This does work
  die();
}
?>

With all things remaining the same, except for the company network, I was able to reproduce this issue.

I did some searching on header refresh to see if I could get a better understanding. As it turns out refresh is not a supported HTTP header.

I did see in the User's Guide that Location can sometimes cause a problem, but, based on my recent experience, Refresh can cause problems as well.

I'm just curious why there is an implementation of Refresh for redirect since it is not officially supported.


Messages In This Thread
Why does URL Helper support unofficial HTTP header REFRESH? - by El Forum - 10-12-2010, 08:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB