cookieless session state and image caching

J

Jake

Does cookieless session state (with the sessionid embedded into the url)
interfere with the browser's retrieval of cached images from one session to
the next? Does the sessionid embedded into the url effectively limit
client-side image caching to the lifetime of the session?
Thanks
Jake
 
B

Bruce Barker

depends. if the image url include the session id, then they only be cached
for the session. if your image urls are not munged then they are cached.
normally images are not mapped to asp.net, so the cookie munger will not see
them.

-- bruce (sqlwork.com)
 
J

Jake

Thanks for the clarification, Bruce. The image urls in the HTML are
relative:

<img src="images/cars/mini.gif">

But the url of the page is munged. I take it that the browser knows how to
ignore the sessionid in the addressbar and can figure out from the HTTP
header that the image above resides at:

www.somedomain.com/images/cars/mini.gif

even if the url of the page on which the image appears contains the
sessionid?

www.somedomain.com/(54gfb5zbnpddgfivapztvgaj)/somepage.aspx

When I look at the image properties in IE, the url lacks the session id.
However, according to PageInfo in Firefox (media tab), the url of the image
contains the sessionid.

Are there any sniffers that would show me whether images are being
downloaded or retrieved from local browser cache?

Regards
Jake
 
J

Jake

A followup. When I check my Temporary Internet Files folder, the same image
is being cached many many times, and the only difference among the urls is
the sessionid. So it would appear that while images are being cached, the
benefit of the caching extends only for the duration of the session. Next
time I visit the website, I must download a new copy of the image because
there will be a new sessionid in the url and the browser won't find the
image in its cache folder.
Jake
 
T

Timo

You have to use absolute urls for your images, I believe. Absolute urls
won't get munged, and so the browser will cache a copy of the image with the
unmunged absolute url as its internet address.
Timo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top