Let’s do some interesting stuff. Today we are going to offline the single page of a web application. For this, we will use Rack offline in Ruby on Rails version 4.
Installation and configuration
To install write
$gem install ‘rack-offline’
then open Gemfile and add
after that open config/routes.rb file and add
match “/application.manifest”=>Rails::Offline,:via=>[:get], :as=> :manifest
then open view/layouts/aaplication.html.erb
<html lang=’en’ manifest=’/fr/application.manifest’>
and then Run the server using
and here’s you are done. 🙂 your web page will work offline.