Back to Epicmafia

updating avatars

over 9 years

im making a thread so the rest of you can pressure lucid into doing it

im sure you're all familiar with changing your avatars and nobody else sees the new avatar and some people see two different avatars at once and it's kinda lame i guess

there's a simple solution that doesn't require clearing your cache every time some random changes their avatar, and it's called timestamps. how do they work?

when you update an avatar, the url stays the same. mine is https://em-uploads.s3.amazonaws.com/avatars/217853_original.jpg

but if you add a timestamp via query string when someone updates their avatar, the browser will recognize it as a new file and load it from the server again instead of using a cached copy. https://em-uploads.s3.amazonaws.com/avatars/217853_original.jpg?123456789

just add a query string to avatar urls with the last updated timestamp and avatars will always be up to date while still cached since that update, the way it's supposed to be

about 9 years

DrSharky says

How simple is this to implement?


incredibly

you just need to save the last timestamp when someone changes their avatar and load it while loading other info like username then append it to the avatar url

most sites do this/something similar (some use an incrementing integer instead)
about 9 years
Why not :)
about 9 years
How simple is this to implement?
about 9 years
bump.
over 9 years
i havent been a bird for a month
over 9 years
Also, can this be done with profile backgrounds? It sucks to clear cache 40 times for each background you change etc.
deletedover 9 years
can we also make it where instead of uploading an image from your computer, that we can insert a link as our profile picture? i think that'd be very convenient
over 9 years
that explains why i lost the pictures to my old profile pics
deletedover 9 years
please lucid
over 9 years
lucid please