NSB.cacheStatus

From NSB App Studio
Jump to navigation Jump to search

NSB.cacheStatus

Description

NSB.cacheStatus returns the current cache status. When an app starts, it checks the server to see if a new version of the app is available. If there is, it is loaded. If not, the cached version of the app is used. NSB.cacheStatus contains the current state of this process. Once the cache process is complete, cacheStatus will be empty ("").

Possible values are:

cached All the files have been cached for the first time.
checking The browser is checking to see if the manifest file needs to be downloaded.
downloading The browser has determined that the manifest file does need to be downloaded. This event is fired when the new files start downloading.
error The cache process failed.
noupdate The browser has determined that the manifest file does not need to be downloaded. No further events will fire.
obsolete The request for the manifest file returned a 404 Not Found or 410 Gone. All the files in the cache will be deleted.
progress Continually fired as the files are downloaded. It reports the total number of files to be downloaded and the total number of files downloaded thus far.
updateready All the files have been updated. The cache has been updated.

Example

Print "The current cache status is " & NSB.cacheStatus

Output

The current cache status is obsolete