Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching of HTML + CSS problematic #51

Open
2 of 8 tasks
joshbruce opened this issue Nov 6, 2021 · 0 comments
Open
2 of 8 tasks

Caching of HTML + CSS problematic #51

joshbruce opened this issue Nov 6, 2021 · 0 comments

Comments

@joshbruce
Copy link
Member

joshbruce commented Nov 6, 2021

Describe the bug

  • HTML documents are cached for 2 days - updating too often right now for that to make sense.
  • CSS is cached for 30 days - updating too often for that to make sense.

Custom cache setting aren't overriding previously set values; the favicon.ico has two cache-control values.

It seems the cache-busting recommendation of today is the same as it was ca. 2001 (Flash); append link URL with a query string that gets updated when the style sheet gets updated.

Proposed solution

  • Modify .htaccess temporarily (60 days??) to be no-cache - the following are targets and should be incrementally increased to achieve as things stabilize:
    • assets/favicons 30 days
    • assets/css 7 days (w/ query string)
    • assets/js 7 days (w/ query string)
    • media/* 30 days
    • text/html 2 days
  • Use git log on CSS and JS files to append file url query string: git log -n 1 --pretty=format:%H -- my/file.c
    • Using microtome for now

Resources and references

@joshbruce joshbruce pinned this issue Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant