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

remove global browser caching #5857

Merged
merged 1 commit into from
Jan 12, 2021

Conversation

anoymouserver
Copy link
Contributor

API calls for the frontend get stuck in the browser cache and the Apache .htaccess also doesn't contain anything similar.
Fixes #5472

Signed-off-by: anoy <anoymouserver@users.noreply.github.com>
@MorrisJobke
Copy link
Member

See #2197 (comment)

cc @jivanpal @josh4trunks

@josh4trunks
Copy link
Contributor

@jivanpal it looks like this was added back in summer 2020. I also do not see any default max-age in the .htaccess. Please confirm if there is any specific reason you want to keep it, otherwise I agree with @anoymouserver that we should remove it.

@jivanpal
Copy link
Contributor

jivanpal commented Jan 11, 2021

@josh4trunks, I used expires 1m as a default for the current config just because it's generally good practice to cache things, but if this is affecting functionality, then of course please change it; I am not familiar enough with the inner workings of Nextcloud to really be able to provide any more info than I already have in the comments on the config, so I am happy for you to make any changes to it. The intent was always just to create something semantically equivalent to the Apache config, but in a concise, readable, efficient way for Nginx admins.

Also, from #2197, I said:

Regarding the specific issue with Cache-Control headers there, do you know if Nginx overrides HTTP headers set by PHP? If so, we probably do need to get rid of the expires mentioned by @anoymouserver and instead rely on PHP to set the header, or do some sort of if on $http_cache_control.

If expires 1m is never of any real benefit, then I would suggest just getting rid of it.

@josh4trunks
Copy link
Contributor

josh4trunks commented Jan 11, 2021

I'm not using a default expires in my config, so maybe why I never noticed any issues.
👍

@MorrisJobke MorrisJobke merged commit aeb00d8 into master Jan 12, 2021
@MorrisJobke MorrisJobke deleted the anoymouserver/remove-global-browser-caching branch January 12, 2021 17:00
@MorrisJobke
Copy link
Member

/backport to stable20

@MorrisJobke
Copy link
Member

/backport to stable19

@MorrisJobke
Copy link
Member

/backport to stable18

@backportbot-nextcloud
Copy link

The backport to stable19 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable18 failed. Please do this backport manually.

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.

Nginx caching delays for dynamic elements
4 participants