Add cache header to profile picture
-
I've noticed that the profile avatar picture from /api/v1/profile/avatar/... does not return a cache-control header. Could we add one so the browser will cache it?
I guess duration could be discussed, not sure if the url would change if picture changes. If so I guess we could choose a long cache duration.
-
What cache time do you suggest?
Imo 14 days or even 30 days is okay. -
30 days sounds good to me.
-
Currently, the URL is fixed which makes it hard to cache when avatar changes and the browser. However since the profile avatar is not a public route, we could look into having that delivered by the backend dynamically based on some hash. That might be a good idea, then we can set the cache to forever basically.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login