Force rack-offline (or Rails) to update caching manifest

592 views Asked by At

I use Rails 4 with rack-offline to cache my pages. I also want to cache (dynamically generated) html pages for offline browsing. Problem is, with the way HTML5 works, they stay stale until the application manifest is updated.

The docs say:

In production, it generates a SHA hash once based on the contents of all the assets in the manifest. This means that the cache manifest will not be considered stale unless the underlying assets change.

Is there any way I can trigger a new hash generation when one of my html pages change? This would, for example, after a database update.

1

There are 1 answers

0
Maarten On BEST ANSWER

Probably not, because AppCache is meant for static resources. Best to use a static HTML page, and use JavaScript to load in dynamic content.

Check out appcachefacts.info for more information.