Modify caching policy for static pages
G
Gwyn Hockridge
Need this, looks to be hindering our page scores by not having control over caching policy. Seems like it should be simple as its a feature on other app platforms.
Nacho Alcazar
It is a great disadvantage compared to competing companies (like Firebase) and I think that the impact that it would take you to develop it would be minimal.
It's critical to manage cache-control. For example (in my vue application) I had to give up having a PWA because the browsers cached the service worker and each update served them files from the previous version
Nathaniel Blackburn
Noticed this myself, this would be a welcome addition for sure.
Manuel Kasper
According to DigitalOcean documentation and information from the support team, the Cache-Control headers for static sites on the App Platform are currently fixed to only 10 seconds max-age, and there is no way to change that. This is really inefficient, as it will cause immutable static resources (like images, or JavaScripts/CSS with versioned filenames) to be practically never cached in the browser, leading to many unnecessary reloads.
A simple setting to override this default of only 10 seconds would go a long way towards improving the performance and efficiency of static sites. As a step further, individual resources (e.g. index.html) could have a different max-age for more fine-grained control over caching.