Page 1 of 1

Page Refresh Problem after uploding image

Posted: Wed Feb 06, 2008 11:43 pm
by viplave
I am working on a site where member can edit their profile. When a member want to change his image and upload a newer one he can't see the immediate effect of changing the image in his profile as the page holds the old one. Please help to solve this problem.

Viplave

Re: Page Refresh Problem after uploding image

Posted: Thu Feb 07, 2008 12:00 am
by Christopher
Set headers to tell the browser not to cache the page.

Re: Page Refresh Problem after uploding image

Posted: Thu Feb 07, 2008 4:20 pm
by dbevfat
A better approach (internet- and user-friendly) is to cache the image indefinitely and change the URL for a member's pic when the user changes it. This way you make sure visitors will get the fresh picture while you'll use the most of caching mechanisms at the same time.

Here's an interesting article on the subject: http://www.mnot.net/cache_docs/.