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

Server: Do not cache index.html #2972

Conversation

runephilosof-karnovgroup
Copy link
Contributor

Or at least only cache it a short while. Set caching to 1 minute. Should not increase server load much, since most page changes are with the javascript spa app and does not ask for index.html.

This will ensure that the right version of the javascript file is loaded.

Fixes #2483

Or at least only cache it a short while. Set caching to 1 minute.
Should not increase server load much, since most page changes are with the javascript spa app and does not ask for index.html.

This will ensure that the right version of the javascript file is loaded.

Fixes woodpecker-ci#2483
@qwerty287
Copy link
Contributor

qwerty287 commented Dec 19, 2023

Can't we just completely remove it and use etag? saw your comment on the issue

@qwerty287
Copy link
Contributor

However, I just found https://github.com/bettercode-oss/gin-middleware-etag - maybe we could try to use it?

@6543
Copy link
Member

6543 commented Dec 19, 2023

yes normally you push etag as header and the browser then decide if it needs a reload

This comment was marked as off-topic.

@lafriks lafriks mentioned this pull request Dec 19, 2023
@lafriks
Copy link
Contributor

lafriks commented Dec 19, 2023

Replaced by #2975

@lafriks lafriks closed this Dec 19, 2023
lafriks added a commit that referenced this pull request Dec 20, 2023
Replaces #2972

Fixes #2483

Removed etag header as etag is used incorrectly, it should be based on
content not startup time and we don't handle it from request headers
anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New javascript/css files are not loaded because index.html is cached
4 participants