Open lewispham opened 8 years ago
@tresdin Since you are running Service worker script on the page, resources will be fetched through that. Can you post the sw.js snippet which you have on the page.
@vigneshshanmugam Those requests won't be fetched through ServiceWorker simply because the client script is executed within the ServiceWorker.
Anyone interested in confirming this bug?
@tresdin I think I had the same problem. You're missing cache headers or your don't have a secure connection implemented.
See the 2nd hint (in the bottom) from this blogpost https://blog.yld.io/2017/03/01/optimize-with-http-2-server-push-and-service-workers/
I hope it helps!
@sericaia Thanks for the information. But I do fetch those files via HTTPS connections and they are also cached for 60 seconds (use Cache-Control
header). From my above example, all of the file have the same caching header, but only 8 out of 14 files are cached properly. It's the primary reason making me believe it's a bug belonging to spdy
.
I've tried to serve some files via http2. Here is my code.
Server
Client
Result![untitled](https://cloud.githubusercontent.com/assets/7781091/16424911/340dfe72-3d8c-11e6-9055-dc46efb174f3.png)
As you can see from the above result, 6 out of 14 files are not fetched from cache. And I still can't figure out the reason behind this strange behaviour.
P/s. This test is run on
Chrome v51.0.2704.106 m (64-bit)
,Node.js v6.2.2
andnode-spdy v3.3.3