I am developing a Chrome extension that opens the extension package's HTML files, so it runs completely on client-side. In the published version to the Chrome Web Store, when I open an HTML page, its JavaScript, CSS, and image resource files stall for 8 seconds (see screenshot below). If I upload the same package in developer mode locally, the files stall for only 70ms. When looking at the Network Tab using Chrome Dev Tools, I see that the lag time is from something stalling the requests for these resources from being sent.
This link explains that the stalling occurs because:
- There are higher priority requests.
- There are already six TCP connections open for this origin, which is the limit. Applies to HTTP/1.0 and HTTP/1.1 only.
- The browser is briefly allocating space in the disk cache
I don't think it is the first option because the stalled files have high priority and shouldn't have too many other requests that come before them. I think it might not be the second option as well because all 15 files are stalled at the same time, instead of six at a time. Moreover, all requests are client-side. Maybe it has to do with the third reason?
My main question is, why would the extension behave differently in the published version vs the local version when it is the same package? And how would I be able to fix the long lag in the published version?
Timing screenshot:
