![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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. |
#3
| |||
| |||
|
|
Hello maluco.beleza (AT) gmail (DOT) com, 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. 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, -- Joerg Jooss news-reply (AT) joergjooss (DOT) de |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |