Question

I want to make my website available offline even if the user clears the cache and cookies. Is is possible? Also I am dealing with database. Is is possible to handle databases offline?

Was it helpful?

Solution

  1. A user could store a local copy of a single webpage using Chrome (right click save-as) and it will store all resources (images, css, js) required to fully load the page offline. Other browsers will have similar options.

  2. You can use wget to mirror a whole website for offline browsing.

    wget --mirror --convert-links --html-extension -p http://www.example.com/
    

    of course neither of these options will handle database driven elements of your site/page.

  3. If you want to mock a database or dynamic elements of a page offline then Google Gears is probably the closest to what you are looking for but I think it was deprecated by Google last year.

OTHER TIPS

For storing data locally and accessing them offline take a look at Gears and Web Storage.

The main problem is what degree of functionality you want to provide with your website. It always requires some work on the client (user) side to "store" aka. save your website offline. You would have to store all your functionality in one page that the user stores (be it a Flash movie or some Javascript-Code).

You can use simple command to download whole website locally with all links working properly.

wget -rk 'http://www.website.com'

For https url you need to add one more property like below :

wget -rk --no-check-certificate 'https://www.website.com'

No, if your databases are housed online. then you need a internet connection for the PHP/ASP (whatever you're using to deal with DBs) to connect/communicate to the DB's

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top