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 sucks #198

Open
sersorrel opened this issue Jan 17, 2022 · 1 comment
Open

caching sucks #198

sersorrel opened this issue Jan 17, 2022 · 1 comment
Labels
backend Relating to the code which runs on the server and generates the site

Comments

@sersorrel
Copy link
Member

when css is updated, it frequently takes a hard-refresh to get the changes to appear (e.g. #197 (comment)). this sucks!

it would be really nice to work out:

  • exactly why this happens
  • if there's any way we can fix it
  • if so, do it; if not, at least write down what the cause is somewhere
@sersorrel sersorrel added the backend Relating to the code which runs on the server and generates the site label Jan 17, 2022
@JMAlego
Copy link
Member

JMAlego commented Mar 8, 2022

I think the usual approach to this is adding some form of differentiator to the URL that makes no functional difference but indicates a change to the browser. For example you might have a URL like: https://www.hacksoc.org/static/style_2017.css might become https://www.hacksoc.org/static/style_2017.css?aabbcc123. Then the ID would change when the file did, this works as long as the HTML is updated by the browser (which it is most of the time). A reasonable ID would be the git commit ID or similar.

Not sure if there's a cleaner way than this though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Relating to the code which runs on the server and generates the site
Projects
None yet
Development

No branches or pull requests

2 participants