I've got a problem with Google Chrome: if i call up an address, google connects two times to the webserver - but only sometimes. I think that has something to do with the cache-control. Every time that happens, the header HTTP_CACHE_CONTROL is not set in the request. Otherwise it's set to max-age=0. I don't want Chrome to connect two times to my script - do you know a solution?
I hope you can help me! Thank You!
EDIT: maybe it's important to know: in that script there is a 301-redirect.
EDIT 2: i disabled the "HTTP_CACHE_CONTROL max-age=0" - same problem.
Furthermore: if i call up "http://localhost/admin?foo=bar" there is no GET-variable "foo" in the first request - but in the second there is.
EDIT 3: If i use javascript instead of the location-header for the redirection, everything works fine.
EDIT 4: you can test it: download this and unzip it. Put it in the folder "www/chrome-test/", so you can call up "http://localhost/chrome-test/redirect/".
Everytime you call up "http://localhost/chrome-test/redirect/" you'll be redirected to "http://localhost/chrome-test/example/". A message generated by the redirect-Script is shown. I use Sessions to "transport" this message. Then call up "http://localhost/chrome-test/redirect/" again (USE THE ADDRESS BAR AND PRESS RETURN!!!!). Repeat this last step a few times (maybe 20 times). Sometimes the message "This is a message..." is shown two times - so the redirect-script run two times. But why?
Does your icon for the page appears in the Chrome browser? If not, Chrome looking for favicon.ico, and if your site return 404 page with same code, chrome will do it twice.
<link rel="icon" href="/favicon.ico" sizes="32x32" type="image/png" />