Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MDN javascript docs for offline use [closed]

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 ?

like image 657
Pierre Avatar asked Feb 29 '12 15:02

Pierre


People also ask

Can I download MDN?

You can download the MDN docs using the table below. Before downloading, please consider using a documentation browsing app like Dash (macOS), Velocity (Windows) or Zeal (Linux) instead. These apps will help you get the most out of the docs, by providing a search index and quick access to everything you need.

What is MDN plus?

Mozilla today launched MDN Plus, a paid subscription product on top of the existing (and recently re-designed) Mozilla Developer Network (MDN), one of the web's most popular destinations for finding documentation and code samples related to web technologies like CSS, HTML and JavaScript.


4 Answers

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).

like image 138
zerodeux Avatar answered Oct 16 '22 13:10

zerodeux


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.

like image 30
Thibaut Avatar answered Oct 16 '22 14:10

Thibaut


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.

like image 7
bogdansrc Avatar answered Oct 16 '22 14:10

bogdansrc


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.

like image 6
user4815162342 Avatar answered Oct 16 '22 13:10

user4815162342