You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add the first PDF file from the attachments to a repository, and name the file e.g. test.pdf.
commit & push.
in the web UI, navigate to the repository and display the PDF file in the repository. The PDF is nicely displayed.
simulate some changes in the PDF by replacing the existing PDF with the second ond from the attachment. Git marks the PDF file as changed, because there are differences.
commit & push.
in the web UI, navigate to the repository and display the PDF. Expected behaviour: the replaced PDF should be shown (with the changes). Actual behaviour: the browser still loads the old version of the PDF, without the changes.
in the web UI, navigate to the PDF, and select the Raw download. The browser downloads the wrong PDF file with the old contents.
in the web UI, choose "Download Repository". In the downloaded ZIP or TAR file, the correct PDF is included.
Obviously, Gitea (or the web browser) performs some internal caching which leads to the fact that PDF files are not properly updated when they have been changed. Even refreshing the page in the browser does not solve the issue. It can only resolved by using a browser on a different computer, using an "incognito" tab or completely clearing the browser cache. While it is not strictly necessary to have PDF files in Git, it still indicates some problems with caching and the question arises: could this behaviour also affect other files, e.g. plain text files, or source code files or images?
I have this same issue with firefox but not chrome. If I navigate to view the file via the exact commit, then the pdf renders properly, if not then I see the "cached" version.
Mozilla Firefox 98.0.1
Google Chrome 99.0.4844.82
git version 2.25.1
os CentOS Linux 7
gitea version 1.16.2
database SQLite3
For some reason this does not reproduce in the example above, but when I produce my own version the cached issue persists.
[x]
):Description
Steps to reproduce:
test.pdf
.Raw
download. The browser downloads the wrong PDF file with the old contents.Obviously, Gitea (or the web browser) performs some internal caching which leads to the fact that PDF files are not properly updated when they have been changed. Even refreshing the page in the browser does not solve the issue. It can only resolved by using a browser on a different computer, using an "incognito" tab or completely clearing the browser cache. While it is not strictly necessary to have PDF files in Git, it still indicates some problems with caching and the question arises: could this behaviour also affect other files, e.g. plain text files, or source code files or images?
test.pdf
test.pdf
The text was updated successfully, but these errors were encountered: