Creating a standalone version of web applications

So, I am creating a web application or website using laravel as the php server and bootstrap for the interface and using the mysql database (phpmyadmin) from the hosting service. since in my country the internet connection is bad, I think that the way to make my site accessible or can be used without an internet connection, so it will be so.

  • If there is a bad or no internet connection, my site will download local data such as html, js, css, as well as the mysql database from the local machine

  • When the internet connection is good or affordable, my site will download data such as html, js, css, and also synchronize the mysql database (phpmyadmin) from the local machine to the hosting service or otherwise

So how to achieve this?

+4
source share
2 answers

Use the Service Worker to notify your foreground network connections and store data locally when a connection is not available.

0
source

If you just need to synchronize the database with a remote host, you can use the MySQL replication setting.

http://dev.mysql.com/doc/refman/5.7/en/replication.html

Frequently asked questions have already told you that the connection does not have to be always available.

https://dev.mysql.com/doc/refman/5.5/en/faqs-replication.html

Hope this helps.

0
source

Source: https://habr.com/ru/post/1620236/


All Articles