You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cause, as best as I can tell, is that Chrome will randomly fail to load the googleapis.com link when the page is first loaded. (It seems to work fine whenever an already open page is reloaded.) I've been unable to find any details as to why. Sample console error messages:
When this happens, Workbox may cache an opaque response, causing the next page load or reload to not have valid fonts. (I believe that had previously happened in the sample console messages - the previous response had failed, resulting in the FetchEvent messages, then the current response failed too.)
If I modify the recipe to not cache opaque responses, I no longer have these issues:
Library Affected: workbox-strategies, workbox-recipes
Browser & Platform: Google Chrome 123.0.6312.58 for Mac
Issue Description:
I've noticed that Google fonts sometimes fail to load for my web app.
We're using a standard
<link>
tag to request the fonts stylesheet:and our own local version of the Google Fonts recipe, based off the old https://developers.google.com/web/tools/workbox/guides/common-recipes#google_fonts page:
The cause, as best as I can tell, is that Chrome will randomly fail to load the googleapis.com link when the page is first loaded. (It seems to work fine whenever an already open page is reloaded.) I've been unable to find any details as to why. Sample console error messages:
When this happens, Workbox may cache an opaque response, causing the next page load or reload to not have valid fonts. (I believe that had previously happened in the sample console messages - the previous response had failed, resulting in the FetchEvent messages, then the current response failed too.)
If I modify the recipe to not cache opaque responses, I no longer have these issues:
Based on this, I believe that the recipe's guidance to allow caching of opaque Google fonts responses is out of date.
The text was updated successfully, but these errors were encountered: