matkoniecz / mapsaregreat.com

code of my personal website about maps and OpenStreetMap
https://mapsaregreat.com/
Other
3 stars 1 forks source link

improve caching #5

Closed matkoniecz closed 5 years ago

matkoniecz commented 5 years ago

https://webapps.stackexchange.com/questions/119286/caching-assets-in-website-served-from-github-pages after http://www.webpagetest.org complained


The server serving github pages (including mine) sets CacheControl: max-age=600. It means that cache is set to last only for ten minutes, what is undesirable.

Is it possible to control this value and to set also only-if-cached status?

I know that there is no direct access to .htaccess file or equivalent but I am looking for indirect access via some sort of settings or confirmation that it is impossible.

enter image description here

Note: this question is not a duplicate of https://webapps.stackexchange.com/questions/44871/caching-assets-in-github-pages-github-io that has answer that Github pages have some caching at all.

matkoniecz commented 5 years ago

github support pinged

matkoniecz commented 5 years ago

Answer from Github support:

Thanks for reaching out to GitHub Support about using GitHub Pages

We set the following Cache-Control header for all GitHub Pages content:

Cache-Control: max-age=600

This header is the same for all assets on all sites on our Pages service, and we don't currently provide a way to alter the value.

I hope that this answers your questions.