Safari not honor with cache-control: public, max-age=0, must-revalidate
This may sound weird, Our developer team try to deploy new version on Cloudflare Pages but after post-deploy testing that some iOS/Safari Client can't download new chuck files while Chrome work well. We're assume that because Safari still cache our old version of
index.html and lead to download the old chunk files which already delete out when deploy new Pages version.
I try to see cache-control on our index.html is valid with cache-control: public, max-age=0, must-revalidate AFAIK; this means client will cache index.html but will revalidate every time when they refresh/access another page. But I don't know why this not for Safari? Any known issue or any suggestion to avoid this problem?1 Reply
Do I should override it with
_headers like this?
I think the problem came from code splitting and cloudflare purge old cache when deployment new version. https://community.cloudflare.com/t/best-practices-for-persisting-assets-across-deployments-on-cloudflare-pages/640037/7
Any recommend for best practice?