Automatic manifest file with Manifesto.
We inlcude the Manifesto gem into our Gemfile and install using the command bundle install
... gem 'manifesto'
The only change is in the Sinatra server where we invoke Manifesto for generating the manifest file:
get '/manifest.appcache' do headers 'Content-Type' => 'text/cache-manifest' # Must be served with this MIME type Manifesto.cache end
You can try this example by starting the server and visiting the page http://localhost:4567 in your browser