开发者

Safari not always rendering page

Having an issue where Safari will not always render the page. When it does, it doesn't always show all the images. Issue happens with all the sites run off one set of code. One site is http://www.wfar.com/.

I check the Apache access log and can see the hit, and it passes back a 200 and roughly 8,000 in data. Nothing shows in the error log.

Look in the developer tools, and Safari shows that it received a 304. Nothing is set in my code to return a 304, so must be coming from apache.

I can recreate the issue on multiple computers and 开发者_开发技巧iPhones.


The Problem is related with a 304 BUG.

http://tech.vg.no/2013/10/02/ios7-bug-shows-white-page-when-getting-304-not-modified-from-server/

The only workaround I found was to send a STATUS 200 for MobileSafari and Safari. (iOS 7.0.2 and Safari 7 on OSX)


I got this problems with JavaScript. Change the code of one file results in an empty page. So here is an uncomfortable workaround :

  1. Change the script code
    • Load the page (it will be blank)
  2. Comment out the script(s) from the html-file
  3. Reload the page (it will be rendered)
  4. Remove the comments in the html file (so the script(s) will be loaded again)
  5. Reload the page (it will be rendered correctly with the changed script code)

I know, very nasty, but I think user3297914 is right and this way you get around the STATUS 304...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜