문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top