MDN javascript文档供离线使用 [英] MDN javascript docs for offline use

查看:785
本文介绍了MDN javascript文档供离线使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使 MDN的Javascript参考资料可供离线浏览(个人使用) 。$
我不是网站的所有者也不是开发者,我只能访问其生成的输出。



我的第一个想法是注入HTML5 appcache.manifest 在页面中;使用清单我已经生成了该页面的资产列表。

然后,我尝试使用 file:/// 协议指向我的本地清单文件,使用 http:// 协议最后使用表示文件内容( data:text / cache-manifest,)的 base64字符串。似乎没有什么工作。



Google搜索了一下之后,我偶然发现了他们的公共FTP 。尚未完全抓取尚未。但仍没有发现任何关于 js文件的提及。







我曾考虑使用浏览器的另存为命令保存HTML页面;但我宁愿开发一个基于JavaScript的抓取工具,而不是单独保存每一页。


哪里可以找到离线版本的MDN Docs ?或如何在离线状态下浏览MDN文档

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



关于MDN的下载内容部分提供了上述链接(用于tarball下载)以及其他方法的指导访问MDN内容,包括单页和第三方工具。



其他:不要使用wget&这会给网站带来不必要的压力,并阻碍其他用户。至少请确保 https://developer.mozilla.org/robots.txt (要求温和调节)得到妥善处理。例如,Wget没有处理此问题( http://savannah.gnu.org/bugs/?30999 )。


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 ?

解决方案

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

这篇关于MDN javascript文档供离线使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆