Mobile app version of vmapp.org
Login or Join
Michele947

: Can the double downloads in pages with tags be avoided for user refresh requests? When a user refreshes/reloads a web page, this results in HTTP requests with max-age=0. Pages utilizing the

@Michele947

Posted in: #GoogleChrome #Optimization

When a user refreshes/reloads a web page, this results in HTTP requests with max-age=0. Pages utilizing the prefetch or subresource feature (e.g. tags like <link rel="subresource" href="/code.js"> in the head) will then see two such fetches, at least from Chrome. Unlike regular page requests, Chrome does not appear to cache and indeed downloads the resource twice.

Is there a way to prevent this waste of resources? Can I hint to browsers that the prefetch and subresource features are only meant for regular page loads, or that even on a user-initiated page refresh they should cache it for at least one second?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Michele947

2 Comments

Sorted by latest first Latest Oldest Best

 

@Merenda212

Chrome is going to remove support for <link rel=subresource> as it's not useful, proprietary, and buggy: crbug.com/581840
Use <link rel=preload> instead.

10% popularity Vote Up Vote Down


 

@Pierce454

I believe rel=subresource has yet to be implemented in any browser unlike rel=prefetch which has been. As for Chrome development there is this issue ticket you can follow: code.google.com/p/chromium/issues/detail?id=312327
Related: stackoverflow.com/questions/24000590/link-rel-subresource-href-file-doesnt-cache-despite-having-correct-cache-h

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme