Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / February 2006

Tip: Looking for answers? Try searching our database.

Image does not refresh

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
maluco.beleza@gmail.com - 01 Feb 2006 16:24 GMT
Hi,

I'm new to asp .net and am having a few problems with web controls.

I have a page which displays an image. On that page, I also allow users
to upload a new image. Once I upload the new image, I set the ImageUrl
to the newly loaded image and the new image is displayed. However, if I
leave the page and come back to it, the old image shows up. I can only
see the new image if I refresh my browser.

I'm guessing that the page is being cached and all I need to do is to
avoid that of happening. I've read a few posts on caching but I'm still
shaky on the subject.

Does anyone have an idea of how I can solve this problem? Any help will
be greatly appreciated.

Thanks,
Ma
Joerg Jooss - 01 Feb 2006 18:59 GMT
Hello maluco.beleza@gmail.com,

> Hi,
>
[quoted text clipped - 12 lines]
> Does anyone have an idea of how I can solve this problem? Any help
> will be greatly appreciated.

You have to mark all these image files as non-cacheable. In your case it's
best to put all these files in a separate folder and apply the following
options to the folder, not individual files.

1. Run the IIS admin applet
2. Navigate to the image folder (or file) in the tree view
3. Open the folder's (or file's) context menu and select Properties
4. Here, you can set an expiration date. You can also choose to set any other
HTTP header, such as CacheControl: no-cache.

In your case, you can either try immediate expiration or set CacheControl:
no-cache.

Cheers,
Signature

Joerg Jooss
news-reply@joergjooss.de

maluco.beleza@gmail.com - 02 Feb 2006 03:56 GMT
Hi Joerg,

Thank you very much for your help.
I followed your instructions on setting the properties on IIS and all
images on my pages are up to date now.

Thanks again,
Ma

> Hello maluco.beleza@gmail.com,
>
[quoted text clipped - 29 lines]
>
> Cheers,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.