simonw / datasette

An open source multi-tool for exploring and publishing data
https://datasette.io
Apache License 2.0
9.41k stars 672 forks source link

static assets and favicon aren't cached by the browser #974

Open obra opened 3 years ago

obra commented 3 years ago

Using datasette to solve some frustrating problems with our fulfillment provider today, I was surprised to see repeated requests for assets under /-/static and the favicon. While it won't likely be a huge performance bottleneck, I bet datasette would feel a bit zippier if you had Uvicorn serving up some caching-related headers telling the browser it was safe to cache static assets.

simonw commented 3 years ago

Come to think of it I've noticed that in the logs when it's running on my laptop, definitely worth fixing.