Groups | Blog | Home
all groups > asp.net caching > january 2005 >

asp.net caching : OutputCache seems not to work on client



Dot Net Man
1/19/2005 3:39:36 PM
Same application different configurations seems to work differently:
asp.net cache on server seems to work fine.
same definition for client side caching does not work.
while testing the same scenario on different configuration seems to work
fine.
configuration that fails: IIS 5.0 + IE6.0 SP1 (build 2800)
configuration that works: IIS 6.0 + IE6.0 SP1 (build 3790)

Does anyone knows about those issues?

Definition: < %@OutputCache Location="Client" Duration=300 VaryByParm="none"
%>

navigation to the cached page is done through hyperlink.




Ben Strackany
1/21/2005 12:58:31 PM
Oh, IE and caching brings back memories. Caching stuff it shouldn't, not
caching stuff it should.

My guess is it's a bug w/ that revision of IE. You can use curl or wget to
look at the actual headers being passed back from that page, & try to
"force" IE to cache it by explicitly setting various response.expires, et
al. values. But that's work that @outputcache should be doing, right?

Well...as you're finding, asp.net client-location caching sets HTTP headers
that tell "compliant" clients to cache the page for a certain length of time
or whatever. But asp.net client-location caching relies on the client (i.e.
the browser, a proxy server, etc.) to do it's job and obey the headers. And
some clients are gonna be buggy or disobedient (e.g. the user changes their
browser settings to "always download the latest copy of pages"). Unless
you're working with a standard deployment base, you're stuck with the fact
that some % of users are going to be, hmm, nonstandard.

So when developing your web application, you can't rely on every browser
obeying the headers you send it, even though most browsers will. And in the
world of caching, that's sometimes good enough.

--
Ben Strackany
www.developmentnow.com


[quoted text, click to view]

AddThis Social Bookmark Button