63

I am trying to make MDN's Javascript Reference available for offline browsing (personal use).
I am not the website's owner nor developer, and I can only access its generated output.

My first thought was to inject an HTML5 appcache.manifest in the page ; Using manifestR I have generated a list of the page's assets.
Then I've tried pointing to my local manifest file using the file:/// protocol, using the http:// protocol and finally using a base64 string, representing the file's contents (data:text/cache-manifest,). Nothing seems to work.

After googling a bit, I stumbled upon their public FTP. Haven't fully crawled it yet. But still didn't find any mentions of the js docs.


I have considered saving the HTML pages using the browser's Save As command; But I would rather develop a javascript-based crawler than saving every single page separately.

Where can I find an offline version of MDN Docs ? Or how can I browse MDN docs while being offline ?

Pierre
  • 18,643
  • 4
  • 41
  • 62
  • There is currently no offline version of the MDN docs and you can stop crawling the FTP server - you won't find it there. Exporting the docs for offline use is planned for the next MDN version but I'm not sure how far along that one is. – Wladimir Palant Mar 01 '12 at 05:45
  • As @WladimirPalant mentioned, this is planned. See also: [original suggestion](http://mdn.uservoice.com/forums/51389-mdn-website-feedback-http-developer-mozilla-org/suggestions/1390125-mdn-documentation-available-for-offline-reading) and the [associated bug](https://bugzilla.mozilla.org/show_bug.cgi?id=665750). – Benjamin Oakes Mar 28 '12 at 13:38
  • 1
    MDN offline copy. https://github.com/mozilla/kuma/ – Vasiliy Toporov Aug 10 '12 at 02:33
  • 1
    @Vasily: The project looks cool, but it appears to be a fairly complicated install just to use the docs for reference. Do you know if there are any plans for a read-only version of the HTML files, without needing the whole wiki backend? – user4815162342 Dec 16 '12 at 03:58

6 Answers6

67

Download it at https://mdn-downloads.s3-us-west-2.amazonaws.com/developer.mozilla.org.tar.gz

The "Downloading content" section of About MDN provides the above link (for a tarball download) along with guidance on other ways to access the MDN content, both as single pages and via third-party tools.

And others : don't mirror with wget & co, this is putting un-needed pressure on the website and hinders other users. At least make sure https://developer.mozilla.org/robots.txt (which asks for gentle throttling) is properly handled. Wget does not handle this for instance (http://savannah.gnu.org/bugs/?30999).

BSMP
  • 4,596
  • 8
  • 33
  • 44
zerodeux
  • 3,533
  • 1
  • 20
  • 11
  • 11
    It's worth noting that this tarball represents a copy of the **entire** MDN wiki source, including all locales, all user pages, all talk pages, everything. It decompresses on my machine to a gargantuan folder about 5 gigabytes in size. Not a huge deal, but it was way bigger than I expected. – Max Cantor Apr 18 '14 at 14:19
  • just use `wget --limit-rate=200k --continue https://developer.mozilla.org/media/developer.mozilla.org.tar.gz` — which will also let you resume the download. and the file is 7G before decompression now. – Orwellophile Aug 26 '15 at 00:37
  • 1
    I download it , but the resources also refer to lots of CDN reosurces. So it still can't work offline. – Does Dec 28 '18 at 06:08
43

The JavaScript docs along with most of MDN's web reference pages are available on DevDocs.

The app is open source and can be run offline: https://github.com/Thibaut/devdocs

It's easy to set up and doesn't require scraping MDN.

Thibaut
  • 607
  • 6
  • 7
  • 7
    How did I not know about this? This should definitely be marked as the right answer. Offline storage using IndexedDB?!? It's so meta I'm crying. Thanks for building such an amazing tool! – samson Oct 14 '16 at 04:49
7

If you have a Mac, Dash (http://kapeli.com/dash) has docsets generated from the Mozilla Developer Network, including JavaScript. You can also avoid using Dash by downloading the docset directly from http://kapeli.com/feeds/JavaScript.tgz.

bogdansrc
  • 1,338
  • 2
  • 15
  • 28
  • 4
    [Zeal](http://zealdocs.org) is a Linux and Windows alternative to Dash. There are even [IDE plugins](http://zealdocs.org/usage.html) available – lightonphiri Aug 09 '15 at 05:49
  • 1
    Unfortunately currently this Javascript doc only contains the api documentations! – Anwar Sep 01 '17 at 13:57
6

This looks fairly promising: https://github.com/rgarcia/dochub

It's an all-in-one documentation site which can be installed on your own computer (requires node), containing data from a number of standard web references including MDN. It contains a screen scraper component that extracts the info from MDN, and updates it fairly quickly (at least a lot faster than the wget mirror command mentioned above). I haven't confirmed how complete the docs are as scraped, but at first glance they look pretty good.

user4815162342
  • 2,058
  • 3
  • 18
  • 23
2

DevDocs gives you 519 different documentations all from MDN and developed using Ruby scraper and JavaScript application. This should help anyone who comes across this question. Its also Open Source on GitHub

AspiringLu
  • 47
  • 5
1

download wget and use it to mirror the doc :

wget -m -p https://developer.mozilla.org/en/JavaScript/Reference

glebm
  • 20,282
  • 8
  • 51
  • 67
mpm
  • 20,148
  • 7
  • 50
  • 55