Skip to content

JS/CSS and other assets should be linked from the generated HTML having their last mod time #3401

Closed
@thehowl

Description

@thehowl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions