buro9 / microcosm

Front end for Microcosm, a Go web server that serves the static files, templates and performs API calls.
GNU Affero General Public License v3.0
11 stars 3 forks source link

Add caching of static files served from the embedded file system #128

Closed buro9 closed 1 year ago

buro9 commented 1 year ago

The changes within #122 broke the ability for the browser to cache every static file.

Hypothesis is that as this is not a real file system, that it lacks some properties like file timestamps and so does not cache. Will need some investigation.

Evidence of lack of cache: Screenshot 2022-09-05 093123

What it should look like: Screenshot 2022-09-05 093246

Note that when static files are cached by the browser, that after the first request only the dynamic request (the page itself) is shown in the logs as all of the other requests were in the 3xx range and cached by the browser.