Application Cache Events

179 views
Skip to first unread message

StrongSteve

unread,
Aug 26, 2011, 5:04:03 AM8/26/11
to Google Web Toolkit
Hello,

I am currently experimenting with the application cache.
After creating a appcache.manifests for the different browser versions
I am wondering if there is a way to listen for the application cache
events inside GWT?

Using Chrome Dev Tools you see a lot what is going on with the
application cache.
For example things like:

Document was loaded from Application Cache with manifest XXX
Application Cache Checking event
Application Cache Downloading event
Application Cache Progress event (0 of 43) XXX
...
Application Cache UpdateReady event

Any chance to capture these events inside GWT?
My further goal is to detect dynamically if my application is on- or
offline.

Thanks in Advance!
Stefan

Jens

unread,
Aug 26, 2011, 5:32:01 AM8/26/11
to google-we...@googlegroups.com
To see what variables/methods/events are available on the ApplicationCache take a look at: http://www.w3.org/TR/html5/offline.html#applicationcache 
A small example how to use it in native JavaScript can be found here: http://www.html5rocks.com/en/tutorials/appcache/beginner/

So you should be able to write some JSNI methods to access the application cache programmatically through GWT. Also take a look at the javascript property "window.navigator.onLine".

-- J.

Thomas Broyer

unread,
Aug 26, 2011, 5:47:39 AM8/26/11
to google-we...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages