Closed dschmidtadv closed 1 year ago
If I'm not mistaken, JavaScript like that is executed in the browser, so it'll use browser-level caching of the original script (GA, etc.) when possible
@dschmidtadv You need to update .js url and point it to your CF proxy folder like /proxy/www.google-analytics.com/analytics.js
for example.
Closing this issue because the initial question was addressed. Also the templates have moved over to the worker-sdk monorepo: https://github.com/cloudflare/workers-sdk/tree/main/templates.
if you're still experiencing issues feel free to open an issue there.
A lot of scripts nowadays are added to the HTML using code such as
insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga')
It would be great if caching those locally would be supported.