Assets and caching


#1

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
#2

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