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
This library currently stores the analytics.js script in cache, but due to CORS restrictions, the script fails to load for offline requests (except in cases where it's already in the browser's HTTP cache).
A short term fix is to have users host the analytics.js script themselves. In the longer term, it'd be nice to either add CORS support to analytics.js or change the way <script> tags handle opaque responses in service worker cache.
I'm looking into the long-term solutions.
The text was updated successfully, but these errors were encountered:
No big gotchas; here are the primary downsides I see:
When you self-host you don't get updates/bug fixes.
When you self-host you miss out on the fact that visitors to your site likely already have the analytics.js script in their cache (since it's used on so many sites on the internet).
Library Affected:
sw-google-offline-analytics
This library currently stores the
analytics.js
script in cache, but due to CORS restrictions, the script fails to load for offline requests (except in cases where it's already in the browser's HTTP cache).A short term fix is to have users host the
analytics.js
script themselves. In the longer term, it'd be nice to either add CORS support toanalytics.js
or change the way<script>
tags handle opaque responses in service worker cache.I'm looking into the long-term solutions.
The text was updated successfully, but these errors were encountered: