Graphic Bar
D3xt3r.com
Panel
Graphic Bar
Google Chrome Quirk

06.21.2009

I found out about, and tested something very important to note about Google Chrome Browser and using header("Location: ") modifications in PHP.

When Google Chrome accesses a page (http://d3xt3r.com/braintest.phccesses a page (http://d3xt3r.com/braintest.php) with the following code:

<?php
header ('HTTP/1.1 301 Moved Permanently');
header("Location: http://d3xt3r.com/braintest");
die();
?>

The browser address bar will "fail" to update to the new address (http://d3xt3r.com/braintest from http://d3xt3r.com/braintest.php) until you refresh the page. To work around this, you must add a line of code.

<?php
header("Status: 301");
header ('HTTP/1.1 301 Moved Permanently');
header("Location: http://d3xt3r.com/braintest");
exit;
?>

And you must be sure to use the correct capitalization of "Status" in the added header() line.


My works are covered under D3xt3r.com Works



Comments

From: Dex

Note: I tested this on Google Chrome 2.0

3.07 PM 06.21.2009

From: Brad

Hmm, I hate browser compatibility xD

2.25 AM 06.22.2009

From: Dex

Since Chrome seems to use AppleWebKit, I would assume this issue may also arise in Safari Web Browser.

5.29 PM 06.26.2009

From: D3xt3r

I haven't tested this in a while. I am not sure if it's an issue with browsers or not.

7.22 PM 08.18.2010

Name

Website

Email (Not public.)
Comment


d3xt3r d3x d3xt3r.net www.d3xt3r.net
Online | 1,641,251 Hits | 5 Users Online | Load 0.055 Secs
Website Design & Implementation By D3xt3r
Powered By X.D.D | W3C Validate: HTML/CSS
veltx veltix d3xt3r d3x dex dexter