-
-
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
Add Cache-Control to avatar redirects #16973
Conversation
This does seem to do the trick to make the Avatar redirects cachable in Chrome. In Firefox, it does not seem to work, thought and I found no way to suppress the requests to the original URLs, I even tried setting an Etag to no avail. Related discussion in go-gitea#16964.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit but otherwise lgtm
The default A user won't see his new avatar in 6 hours if he did a change ...... maybe he will submit a new issue saying "avatars not changed" Is it good for end users? |
We could shorten the default time a bit. Gravatar and GitHub use 5 minutes, for example. |
Nice. In my testing I could not get Firefox to cache the redirect for whatever reason, even tried a completely fresh profile. |
This does seem to do the trick to make the Avatar redirects cachable in Chrome.
In Firefox, it does not seem to work, thought and I found no way to suppress the requests to the original URLs, I even tried setting 301 or an Etag to no avail.
Related discussion in #16964.