1 (edited by mixart 2008-07-31 04:52)

Topic: user avatar upload non-cache

I've had many users say they've had problems uploading their avatar and I've determined that most of the time this is not that the upload did not work, but rather the avatar is cached by the browser and not refreshing.

I suggest putting a random seed at the end of the avatar image so it always load the latest version.

Here's what I added to my code:

<img src="<?php echo $id.'.'.$avatar_format.'?'.rand(10000,99999); ?>

Re: user avatar upload non-cache

The price is higher load of the server, though it is worth of it sometimes.
Thanks for idea. This can be an extension.

Carpe diem