Assets and caching


I was surprised to find that assets are served with a Cache-Control: max-age=0 header, which means that the browser will always revalidate them. Glitch seems to append a timestamp when copying an asset’s URL to the clipboard, shouldn’t it then be safe to give assets a long max-age like 1 year?

Max-age=0 header issue

Thanks for pointing this out, I’ve pushed an update that sets newly uploaded assets to have a max-age of one year. :thumbsup: