Post

mike douges
mike douges@douges·
anyone know if cloudflare pages can keep old javascript files from previous deployments so users don't get hit with the ol chunk not found 404
English
2
0
2
576
marais
marais@slightlycode·
@douges cloudflare pages should do that by default. it's cloudflare workers that doesn't.
English
1
0
0
50
mike douges
mike douges@douges·
@slightlycode after a new deployment it's cached on the edge but not at origin anymore so if you either never downloaded it before, or cache bust with a query string, when loading it next you get a 404 definitely using pages
English
1
0
1
63
marais
marais@slightlycode·
Hmmm. odd, yeah definitely remembering it being all the rage back in the day. here's a blog post about it blog.cloudflare.com/extending-the-…. But the whole idea about asset manifest, i don't think exists anymore. Maybe you're right, origin assets now longer stick around. #asset-retention" target="_blank" rel="nofollow noopener">developers.cloudflare.com/pages/configur… Me personally, I use public,max-age=60,must-revalidate and a cloudflare-cache-control of public,max-age=604800. with immutable assets.
English
1
0
0
38
marais
marais@slightlycode·
@douges oh ahaha sorry! i more meant, hey none of this makes sense, so just did something i did understand. don't cache client, cache edge 🙃😅
English
1
0
0
30
Compartilhar