Blank page in Safari with fast refresh

ktwalrus nginx-forum at nginx.us
Sat Aug 1 23:07:12 MSD 2009


I've got a strange problem with Mac OS X 10.5.7 Safari 4.0.2 browsing to my server running nginx 0.8.7.  I updated all software on my Centos 5 server including IPB 3.0.1.

If I refresh a page in the forum within 10 seconds, I only get a blank page.  If I refresh again (or browse to another link that has the same URL but different query strings) within 15 seconds, the page stays blank.  If I get the blank page, and keep attempting to refresh within 15 seconds each time, the page stays blank.  If I wait 15 seconds before refreshing the blank page, it gives the correct page again.  Once I get a correct page loaded, if I load another page (same location) within 10 seconds, I am back to a blank page.

Accessing the site using Firefox instead never gives a blank page no matter how fast or slow I browse.

Here is the HTTP Response header in Safari when the page loads:

Cache-Control:no-cache, must-revalidate, max-age=0
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html;charset=UTF-8
Date:Sat, 01 Aug 2009 18:41:46 GMT
Expires:0
Pragma:no-cache
Server:nginx/0.8.7
Set-Cookie:session_id=5dc65c67115c69cf23829400d558de5e; path=/; httponly, modtids=%2C; path=/
Transfer-Encoding:Identity
Vary:Accept-Encoding
X-Powered-By:PHP/5.3.0

Here is the HTTP Response header if I reload within 10 seconds and get a blank page:

Cache-Control:max-age=31536000, public, must-revalidate
Connection:keep-alive
Date:Sat, 01 Aug 2009 18:41:47 GMT
Etag:"1249144255pub"
Expires:Sun, 01 Aug 2010 18:41:47 GMT
Last-Modified:Sat, 01 Aug 2009 16:30:55 GMT
Server:nginx/0.8.7
X-Powered-By:PHP/5.3.0

Somehow, some piece of software must think the page hasn't changed so is serving up no content, but Safari hasn't cached the page in the first place (since the good load response clearly states that the page expires 0 and shouldn't be cached. But, somewhere along the chain (nginx? php-fpm?), is thinks the page was cached by Safari and doesn't even try to run the PHP again to get a new page.  

The strange thing is this is very repeatable and the first attempt to reload must be made exactly more than 10 seconds after the last reload and if I get a blank page, I have to wait exactly more than 15 seconds for it to run PHP again.

Could this be an nginx problem?  I really haven't been using nginx much or using this server much until yesterday when I upgraded the server yesterday to the latest of nginx, php-fpm, php, and ipb.  Maybe this is a Safari problem?  Doesn't happen in Firefox or Opera.

Any ideas?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,4677,4677#msg-4677






More information about the nginx mailing list