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

Disable Browser Caching for RAW view #13499

Closed
1 of 6 tasks
liszca opened this issue Nov 10, 2020 · 1 comment · Fixed by #15370
Closed
1 of 6 tasks

Disable Browser Caching for RAW view #13499

liszca opened this issue Nov 10, 2020 · 1 comment · Fixed by #15370
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@liszca
Copy link

liszca commented Nov 10, 2020

  • Gitea version (or commit ref):
  • Git version: 1.12.5
  • Operating system: Debian 10
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

Because of browser caching (in this case Firefox 82.0.2), the RAW file view may not represent the actual file content when Edit was done in browser beforehand.

The first screenshot shows what was saved, the second is Raw view.

It can be solved by clearing the cache of the browser, but is it possible to solve this on the server side?
...

Screenshots

grafik
grafik

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Nov 11, 2020
@Codeberg-org
Copy link
Contributor

It might make sense to version these files with Etag, as we do in codeberg pages: https://codeberg.org/Codeberg/build-deploy-gitea/src/branch/master/var/www/pages/index.php#L146, so that they are cached, but the cache is invalidated with a new commit.

@go-gitea go-gitea locked and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants