Bitcoin Forum

Other => Meta => Topic started by: NotATether on September 25, 2020, 10:10:08 AM



Title: How long does avatar caching last?
Post by: NotATether on September 25, 2020, 10:10:08 AM
When you upload a profile picture, the forum says that we might temporary see the old profile picture because of caching.

Usually the old avatar is visibile for a few seconds. However, When I changed my avatar today, it took a whooping half hour to update, and only changed because I saved a new copy of the avatar and uploaded that.

So my question is, is the time that the old avatar is cached for indeterminate, or does it really take a few seconds to update, which means it was just a glitch in my browser?


Title: Re: How long does avatar caching last?
Post by: bL4nkcode on September 25, 2020, 10:27:37 AM
It depends on the user's browser. Cache is stored locally, so once you delete it on your browser and make a force refresh, then it will be deleted eventually or in minutes.

What I usually do is clear cache, upload my new avatar, then clear cache again. Within 3-5 minutes my new avatar shows.


Title: Re: How long does avatar caching last?
Post by: acroman08 on September 25, 2020, 10:28:53 AM
it's not a glitch on your browser since a lot of members have probably experienced it(including me). one time after joining a new campaign and changed my avatar it took more than an hour after the avatar finally changes to the one I uploaded.

What I usually do is clear cache, upload my new avatar, then clear again. Within 3-5 minutes my new avatar shows.
I tried this when experienced it but it still took a while before the avatar finally changes


Title: Re: How long does avatar caching last?
Post by: JeromeTash on September 25, 2020, 10:34:18 AM
So my question is, is the time that the old avatar is cached for indeterminate, or does it really take a few seconds to update, which means it was just a glitch in my browser?
My latest avatar took over an hour to update. I think the time varies but I doubt if it's a glitch. It shouldn't be a big deal.


Title: Re: How long does avatar caching last?
Post by: rhomelmabini on September 25, 2020, 11:11:59 AM
In my case I usually don't pay too much attention in it as long as I successfully uploaded the new one. If I want to join a signature I'll just tell the campaign manager that it's successful but it may take some time. Usually it take an hour or two (the longest) on my end until it shows on my forum profile avatar especially if that avatar was used for a very long time.

So my question is, is the time that the old avatar is cached for indeterminate, or does it really take a few seconds to update, which means it was just a glitch in my browser?
It really takes long until your browser cache memory recognize the new avatar, unless that avatar was previously cached on your browser. I think it isn't a glitch and this isn't the first time users have encountered the same issue. My advice is just be patient enough.


Title: Re: How long does avatar caching last?
Post by: Lucius on September 25, 2020, 11:19:23 AM
Sometimes it only takes a few minutes, in some cases it takes more than 60 minutes - and my last avatar I changed a few days ago came up almost instantly. It is possible that the reason I made the change immediately after logging in to the forum, so the old avatar failed to catch in browser cache which accelerated the change itself.

I may be wrong, but if you change the avatar try the way I described - or just delete the cache from your browser and reload the forum a few times.


Title: Re: How long does avatar caching last?
Post by: suchmoon on September 25, 2020, 12:44:05 PM
Avatars come with this header:

Code:
cache-control: max-age=7200

So it might take up to two hours, depending on when the avatar was cached.


Title: Re: How long does avatar caching last?
Post by: Peanutswar on September 25, 2020, 02:10:37 PM
Base on my experience it only takes for over 30 minutes after the avatar changes, sometimes I made mistakes clicking the upload instead of choosing a file so the platform takes again a lot of loads to change the proper avatar.

When the avatar is already wearing before it's faster to change.


Title: Re: How long does avatar caching last?
Post by: Vod on September 25, 2020, 05:12:23 PM
Avatars come with this header:

Code:
cache-control: max-age=7200

So it might take up to two hours, depending on when the avatar was cached.

Also, Theymos may have been talking about the forum/CDN cache.

Avatar is changed - forum serves old avatar for a while - changes to new one - your browser serves old avatar for the header time and then updates.

So it could take you as long as 120 minutes plus the max forum/CDN cache time if you hit it just at the wrong moment.


Title: Re: How long does avatar caching last?
Post by: NotATether on September 25, 2020, 05:55:29 PM
Avatars come with this header:

Code:
cache-control: max-age=7200

So it might take up to two hours, depending on when the avatar was cached.

Also, Theymos may have been talking about the forum/CDN cache.

Avatar is changed - forum serves old avatar for a while - changes to new one - your browser serves old avatar for the header time and then updates.

So it could take you as long as 120 minutes plus the max forum/CDN cache time if you hit it just at the wrong moment.

That may be the reason behind my slow update times. I noticed that when I navigated directly to the avatar stored in the CDN, it still had the old one cached in it. So there was nothing my browser could update if the CDN still returns the old avatar.


Title: Re: How long does avatar caching last?
Post by: suchmoon on September 25, 2020, 05:58:46 PM
Avatars come with this header:

Code:
cache-control: max-age=7200

So it might take up to two hours, depending on when the avatar was cached.

Also, Theymos may have been talking about the forum/CDN cache.

Avatar is changed - forum serves old avatar for a while - changes to new one - your browser serves old avatar for the header time and then updates.

So it could take you as long as 120 minutes plus the max forum/CDN cache time if you hit it just at the wrong moment.

I'm guessing that's the 3-5 minute delay some users seem to be experiencing even if they clear their browser cache. Which BTW isn't necessary - you can just do Ctrl+F5 (not sure about mobile though).