How to download the jQuery Mobile documentation for offline viewing

Download the jQuery Mobile documentation for offline use.

Download the jQuery Mobile documentation for offline use.

Recently I was heading off on a long airplane trip and, because SeatGuru said I would have power at my seat, I was planning to do some tinkering with jQuery Mobile.

Having power at your seat is one thing, but having a WiFi connection is another. In anticipation of having no connectivity, I sought ways to download the full jQuery Mobile documentation.

In the past, I’ve successfully used a Windows program called HTTrack for spidering and downloading any webpage. Not finding or liking any of the Mac alternatives, I Googled further and found this simple solution.

For stable releases of jQuery Mobile, the zipped documentation archive will be at:

In my case, this is the link I needed:

It was a beautiful thing to type the above URL into my location bar and see the download start. If you plan to do some offline work yourself, make sure and grab the zipped docs as well as the required jQuery and jQuery Mobile libraries and CSS files. For me, they are located here:

If you have trouble viewing the docs in your Chrome browser (e.g. linking between pages doesn’t work), you can run a dead-simple Python web server on your laptop to serve them up. It’s a two-step process which will take you upwards of 30 seconds:

  1. Open a terminal window and browse to the root of your downloaded and uncompressed jQuery docs
  2. Run this command: python -m SimpleHTTPServer 8080

Go to http://localhost:8080 to see the docs.

H/T to eddiemonge over at this github thread for pointing out the docs download trick and to Andy Davies for the simple Python webserver tip.