5

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?

0

2 Answers 2

1

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

Use <link rel=preload> instead.

0

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: https://code.google.com/p/chromium/issues/detail?id=312327

Related: https://stackoverflow.com/questions/24000590/link-rel-subresource-href-file-doesnt-cache-despite-having-correct-cache-h

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.