I want to make my web app (which is built with laravel) work offline...but I cant found out how to do it!
I am using the "app cache" for static files, but im not sure exactly how to handle the dynamic side of the app.
The app uses a database which im guessing I need to use localStorage for? (from what ive read online so far)
Im basically just looking for someone to point me in the right direction as im struggling to find much online on setting up Laravel for use offline
Thanks, Dave
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.