-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
JS/CSS and other assets should be linked from the generated HTML having their last mod time #3401
Comments
Instead of hashing each file and saving that info in the application to remember, what could be done is to use the git hash of the gitea build (as in |
Thought of that, but if an user changed the file by placing it in the custom/ folder, then the cache wouldn't be invalidated.
I tend to agree with this much more. |
I would still reather see it to be hash of the file |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
Currently, assets are linked directly from the generated HTML, and they are cached by the browser, even more so after #3376. To avoid the website breaking when a Gitea instance is updated, we should probably add at the end of links to JS/CSS and assets a timestamp or a MD5/SHA1 hash of the file, in order to help tell the browser when it has been updated (in spite of the
Expires
on the request); for instance, like this:/vendor/assets/octicons/octicons.min.css?1516470750
or/vendor/assets/octicons/octicons.min.css?34c741261b8c1fe08cde34db14773785
The text was updated successfully, but these errors were encountered: