Clear or disable application cache

2,630 views
Skip to first unread message

Scott

unread,
Mar 1, 2010, 11:37:18 PM3/1/10
to Chromium HTML5
I have a site that I'm developing that uses the application cache (the
site is intended to be an iPhone webapp, using HTML5 local storage +
offline app cache).

To date, I've been using Chrome (on Linux) for desktop development &
testing of the app, and up until the 5.x beta this was working great
(local storage works identically to mobile Safari, and the 4.x Linux
beta didn't support offline application caching anyway).

The 5.x beta for Linux saw application cache enabled by default for
the first time (or at least, window.applicationCache is now a valid
object); and since then I haven't been able to force the browser to
update it's app cache.
No matter what I try (eg. modifying the .manifest file specified in
the HTML tag of my site header), the brower continues to render an
older cached version of the site.

I noticed that the latest dev channel build included the ability to
force browser cache overriding (ie. shift+reload), so I switched from
the beta channel to the dev channel hoping that this might also fix my
application caching issue, but unfortunately the problem still
persists.

I know it's not a problem with my manifest file, as the application
cache works as expected on Mobile Safari (caching the app until the
manifest file changes).

I've tried manually clearing the browser cache (Wrench --> Options -->
Under the hood --> Clear browsing data... --> Empty the cache / Delete
cookies and other site data), which removed my local storage database
(not really what I wanted, but never mind), yet it doesn't seem to
have cleared the application cache?

Does anyone know how I can clear the app cache (or even disable it,
until the tools are ready to manage the application cache properly)?

Jeremy Orlow

unread,
Mar 2, 2010, 5:37:43 AM3/2/10
to Scott, Chromium HTML5, Michael Nordman
+ Michael.


--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To post to this group, send email to chromiu...@chromium.org.
To unsubscribe from this group, send email to chromium-html...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/?hl=en.


Michael Nordman

unread,
Mar 2, 2010, 2:07:05 PM3/2/10
to Scott, Chromium HTML5
On Mon, Mar 1, 2010 at 8:37 PM, Scott <scott...@gmail.com> wrote:
I have a site that I'm developing that uses the application cache (the
site is intended to be an iPhone webapp, using HTML5 local storage +
offline app cache).

To date, I've been using Chrome (on Linux) for desktop development &
testing of the app, and up until the 5.x beta this was working great
(local storage works identically to mobile Safari, and the 4.x Linux
beta didn't support offline application caching anyway).

The 5.x beta for Linux saw application cache enabled by default for
the first time (or at least, window.applicationCache is now a valid
object); and since then I haven't been able to force the browser to
update it's app cache.
No matter what I try (eg. modifying the .manifest file specified in
the HTML tag of my site header), the brower continues to render an
older cached version of the site.

I noticed that the latest dev channel build included the ability to
force browser cache overriding (ie. shift+reload), so I switched from
the beta channel to the dev channel hoping that this might also fix my
application caching issue, but unfortunately the problem still
persists.

 
browser cache != appcache, shift-reload doesn't have any affect on the appcache 
 
I know it's not a problem with my manifest file, as the application
cache works as expected on Mobile Safari  (caching the app until the
manifest file changes).

I've tried manually clearing the browser cache (Wrench --> Options -->
Under the hood --> Clear browsing data... --> Empty the cache / Delete
cookies and other site data), which removed my local storage database
(not really what I wanted, but never mind), yet it doesn't seem to
have cleared the application cache?

Does anyone know how I can clear the app cache (or even disable it,
until the tools are ready to manage the application cache properly)?

Yes, most of the the user interface to delete appcaches isn't hooked up yet, but there is one UI that is. The "Content Settings" dialog has a checkbox labeled "Clear cookies and other site data when I close my browser", appcaches get nuked when that box is checked on exit.

You can run chrome with the command line switch --disable-application-cache to turn it off.

I'm real curious about the lack of updating you're describing? Do you notice the browser making a request for the 'manifest file' after a page is loaded from the appcache? Also what events are raised, is there an onerror event?
 

Scott

unread,
Mar 2, 2010, 5:59:50 PM3/2/10
to Chromium HTML5
Thanks Michael.

> You can run chrome with the command line switch --disable-application-cache
> to turn it off.

Disabling the app cache with the command line switch works (however as
I found out, you need to close all open Chrome windows for it to take
effect; otherwise you get "Created new window in existing browser
session." and the setting doesn't take effect).

> I'm real curious about the lack of updating you're describing? Do you notice
> the browser making a request for the 'manifest file' after a page is loaded
> from the appcache? Also what events are raised, is there an onerror event?

I can see from the server logs that a GET request for the manifest
file is being sent; but even though the file has changes in it Chrome
doesn't seem to be updating it's app cache.

I have event handlers wired up for the onerror and onupdateready
events, and neither are being fired.

I'll have to do some more testing to see what's going on; but for now
I'll just use the command line switch to run with the app cache
disabled.

Thanks for you help.

Reply all
Reply to author
Forward
0 new messages