Caching HTML content on a BrightSign player

Last Updated: May 6, 2016

Unlike many PC-based browsers, the HTML5 engine on the BrightSign player does not cache any HTML content by default. As a result, whenever a page is loaded, the player will retrieve all page content as if it were new. If the page is being loaded from local storage, this process is seamless and nearly instantaneous. However, if the page is being hosted on a remote server, frequently refreshing the page can consume considerable bandwidth; furthermore, page elements will be loaded as they arrive over the connection, which can result in poor aesthetics.

Follow the steps below to enable the HTML app cache on the BrightSign player and use it to cache remote resources.

1. Enable the HTML application cache for your BrightAuthor presentation: Navigate to the Edit > Preferences > Storage tab (available in BrightAuthor versions 3.8.0.38 and later) and set the HTML data cache to the desired amount.

Note: If you are using a custom autorun or script to display HTML content, you can enable the application cache using the SetAppCacheSize() and SetAppCacheDir() methods available on the roHtmlWidget object.

2. Create a cache manifest file specifying the assets that should be cached locally. See below for an example of a simple cache manifest; the formatting and behavior of cache manifest files is outlined in detail on this Mozilla Developer Network page.

11-11-2014_9-35-26_AM.png

3. Ensure the cache manifest contains a "NETWORK" section that specifies all ("*") files that will be used by the presentation. If you wish to be more specific, you can also specify the URL that contains all required files (e.g. "http://www.example.com/").

4. Reference the cache manifest file in the HTML of the page (e.g. <html manifest="cache.manifest">).

5. Upload the cache manifest and index.html file to your web server. The cache manifest should be in the same directory as the index.html file.

When you need the player to download new copies of the cached content, upload a new cache manifest file to the web server with a new version number and date:

Original Updated 

 CACHE MANIFEST
#v1 - 2014-10-28

 CACHE MANIFEST
#v2 - 2014-10-29

Note: Changing the comment containing the number/date is a recommended practice when updating a cache manifest, but, technically, the player will download a new cache manifest file whenever any of the bytes that make up the file are changed.

Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    GD

    Can you further explain point 4? Upload the cache manifest and index.html files to the root of your web server

    If loading pages from example.com/pages/page1.html and **example.com/news/recent.html **does the manifest go int news/ and pages/ or do we really have to put multiple manifests under example.com/ root-directory?

  • 0
    Avatar
    Roni Starc

    As I understand this, the manifest must have the same origin (stated on the mozdev webpage) as the file that references thne manifest, so if index.html is on the BS player, the manifest should also be there, if you pull the index.html from an external webserver it should be on that external web server. So I'm guessing that you just have to put the manifest in the same directory where your html pages are and BA will then include it into the pool.

    You have a single manifest, but you need to reference it on every page that uses the cached values. I.e. in you use the same image on the pages page1 and recent, but you reference the manifest only on page1, the said image for page1 will be fetched from the cache, and for recent will be fetched over the network.

Please sign in to leave a comment.
Can't find what looking for? Try to
Powered by Zendesk