Namespacedojox.off.files

dojo.require("dojox.off.files");
defined in dojox/off/files.js

Jump to PropertiesJump to FunctionsConstructorsBack to top

For advanced usage; most developers can ignore this. Aborts and cancels a refresh.
void console.debug("dojox.off.files.refresh"); For advanced usage; most developers can ignore this. Refreshes our list of offline resources, making them available offline.
void Removes a URL from the list of files to cache.
Autoscans the page to find all resources to cache. This includes scripts, images, CSS, and hyperlinks to pages that are in the same scheme/port/host as this page. We also scan the embedded CSS of any stylesheets to find @import statements and url()'s. You should call this method from the top-level, outside of any functions and before the page loads: <script> dojo.require("dojox.sql"); dojo.require("dojox.off"); dojo.require("dojox.off.ui"); dojo.require("dojox.off.sync"); // configure how we should work offline // set our application name dojox.off.ui.appName = "Moxie"; // automatically "slurp" the page and // capture the resources we need offline dojox.off.files.slurp(); // tell Dojo Offline we are ready for it to initialize itself now // that we have finished configuring it for our application dojox.off.initialize(); </script> Note that inline styles on elements are not handled (i.e. if you somehow have an inline style that uses a URL); object and embed tags are not scanned since their format differs based on type; and elements created by JavaScript after page load are not found. For these you must manually add them with a dojox.off.files.cache() method call. just schedule the slurp once the page is loaded and Dojo Offline is ready to slurp; dojox.off will call our _slurp() method before indicating it is finished loading
Constructordojox.off.files._doRefresh(callback, newVersion)

Jump to PropertiesJump to ConstructorsFunctionsBack to top

void Caches a file or list of files to be available offline. This can either be a full URL, such as http://foobar.com/index.html, or a relative URL, such as ../index.html. This URL is not actually cached until dojox.off.sync.synchronize() is called.
boolean Determines whether the given resource is available offline.
A helper function that will dump and print out all of the URLs that are cached for offline availability. This can help with debugging if you are trying to make sure that all of your URLs are available offline

Jump to FunctionsJump to ConstructorsPropertiesBack to top

For advanced usage; most developers can ignore this. Our list of URLs that will be cached and made available offline.
For advanced usage; most developers can ignore this. Whether we are currently in the middle of refreshing our list of offline files.
An optional file, that if present, records the version of our bundle of files to make available offline. If this file is present, and we are not currently debugging, then we only refresh our offline files if the version has changed.