Safari loads resources in application cache manifest file twice

Originator:jens
Number:rdar://21553445 Date Originated:25-Jun-2015 11:28 PM
Status:Open Resolved:
Product:Safari Product Version:8.0.6 (10600.6.3)
Classification:Performance Reproducible:Always
 
Summary:
When the HTML document references a manifest (for application cache usage), the resources referenced in the manifest (CSS, JS etc.) are loaded twice when the page is initially loaded from the Internet.
These two requests are slightly different; the first seems to have the document URL in the Referer header, whereas the second has no Referer header.
It would appear that the first request comes from the document itself, whereas the second request probably comes from the reference in the manifest.
Loading these resources twice makes Safari slower than competing browsers, e.g. Chrome on Mac which only loads the resources once.

Steps to Reproduce:
1. Start up a proxy such as Charles for monitoring the traffic.
2. Start up Safari and clear the cache.
3. Navigate to http://www.thecssninja.com/demo/offline_webapp/


Expected Results:
Expected to see the resources referenced by both the document and the manifest being loaded exactly once.

Actual Results:
Resources are loaded twice. See attached screenshot.

Version:
OS X: Safari version 8.0.6 (10600.6.3)
iOS 8.3
Windows 5.1.7

Notes:


Configuration:
Problem occurs on all latest Safari platforms - both OS X, iOS and Windows.

Attachments:
'Safari+Charles.png' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!