Re: A Caching Issue - I Suspect
From: Frank Buchan (future_legends_at_hotmail.com)
Date: 02/11/05
- Next message: Frank Buchan: "Re: ASP.NET Dropdownlist BUG???"
- Previous message: Scott Allen: "Re: Bug in Debug?"
- In reply to: Smithers: "A Caching Issue - I Suspect"
- Next in thread: Win, Pats: "Re: A Caching Issue - I Suspect"
- Reply: Win, Pats: "Re: A Caching Issue - I Suspect"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Feb 2005 22:12:50 -0500
When you write the image to the page try making the src link in the format:
"image_name.jpg?t={current time}"
Obviously if it is a GIF file, a different extension, etc., is required.
It is a bit of a hack, but if you set the {current time} to the second you
will get a pretty much unique value. The page will then force load the
image. It works consistently, and as far as I know circumvents evens mart
caching on the client-side because the src is considered new due to the
query string portion. It adds a few bytes to the return, but I suspect that
is a small price to pay.
F Buchan
"Smithers" <a@b.com> wrote in message
news:uqnzMHgDFHA.1836@tk2msftngp13.phx.gbl...
> My ASP.NET app enables users to upload photos - after which they can
> optionally rotate the photo (90 degrees to the left or right). They just
> click a link that causes a postback, and server-side code then manipulates
> the image file - after which the aspx page refreshes on the client,
> showing the rotated version of the photo.
>
> In testing I have observed that sometimes the image will in fact get
> rotated (on the server), but the aspx page in the client will refresh but
> will not show the current version of the photo.
>
> Here is a typical test scenario with a test client running XP/Pro/SP2 IE6
> connecting to separate Windows Server 2003/IIS6 in a data center
> accessible via the Internet (i.e., this testing happens over the
> Internet):
> 1. Upload a photo. The aspx page shows original photo. This is good.
> 2. Click to rotate the photo 90 to the right. The aspx page shows the
> photo rotated 90 to the right. This is good.
> 3. Click again to rotate the photo 90 to the right. The aspx shows the
> photo rotated 90 from original, NOT 180 degrees as is saved on the server.
> The photo should be upside-down at this point and it's not. This is not
> good.
> 4. At this point I can click to rotate the photo 90 degrees right or
> left - and the aspx page continues to show it rotated 90 to the right -
> which was the very first rotation (in step 2). After every rotation
> request sent from the browser, I have verified that the image does, in
> fact, get rotated. I verify this by viewing the image directly on/from the
> server (not through the browser).
>
> I suspected that the image was getting cached on the test client - but
> purging the cache has no effect; rebooting the client has no effect, etc.
> The only thing that seems to actually result in the current version of the
> rotated photo showing up in the browser is waiting - about 10 minutes or
> so.
>
> FWIW: the aspx has this at the top:<%@ OutputCache Location="none" %>
>
> Any ideas for where the images are getting cached? What I need is the
> ability to rotate the photos in any direction, any number of times during
> a session, and have the current version show up in the browser.
>
> Thanks!
>
- Next message: Frank Buchan: "Re: ASP.NET Dropdownlist BUG???"
- Previous message: Scott Allen: "Re: Bug in Debug?"
- In reply to: Smithers: "A Caching Issue - I Suspect"
- Next in thread: Win, Pats: "Re: A Caching Issue - I Suspect"
- Reply: Win, Pats: "Re: A Caching Issue - I Suspect"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|