New3bie question concerning clearLocal cache

1 view
Skip to first unread message


Aug 3, 2010, 11:43:32 AM8/3/10
to eCSStender Mailing List
Is the concept of clearing the cache something that is mainly useful
in testing, only, or is it a production-install necessity?

I'm asking because my 2nd, main, question is: Would this then override
Apache "expires" headers that a designer might be using to force
extended caching of certain files (mainly images) in an effort to
shorten/avoid calls to the server?

Thank you.

Aaron Gustafson

Aug 3, 2010, 12:59:01 PM8/3/10
to eCSStender Mailing List
Not many folks are familiar with the way localStorage and userData
(i.e. client-side caching) works, so you shouldn't feel like a n00b. I
learned about it while writing eCSStender when I began looking at ways
to optimize performance.

Creating a local cache (which is done automatically by eCSStender if
the browser supports it) helps speed things up by storing information
about the number of stylesheets and when they were last updated (per
the headers) as well as a list of stored results from isSupported (so
once the test is run it doesn't need to be run again) and a list of
which extensions ran. All of this allows eCSStender to move just a
little more quickly when the page loads.

I don't know if this answers your question, but hopefully it sheds a
little more light on the topic for you. There's really no way to
control the client-side cache form the server and no reason I can
think of that you'd want to.

On a side note, if and when browsers begin exposing header information
for asset files external to the document, eCSStender will be able to
run even faster because it won't need to use XHR to gather that

I hope that helps.
Reply all
Reply to author
0 new messages