Laravel: Offline Mode? Laravel: Offline Mode? php php

Laravel: Offline Mode?


You can only have a static site offline with appcache. You cannot do this with laravel.

If you want to move the data into localstorage and have a semi- dynamic website, you have to completly change your architecture. Let me outline a possible approach :

A single page web app written in javascript ( using a framework like for instance ExtJs ) that connects to a backend in a form of a webservice that gives access to the database ( you could write it using laravel ).

When you are connected to the server you can load the data in localstorage When you are offline you can continue to work with the data. When the client reconnects, you have to synchronize the changes with the server.

Edit: As of 2020, Application Storage is deprecated. Look into ServiceWorkers instead.