简体   繁体   English

将网页文件夹转换为独立文件以供离线浏览

[英]Convert web folder to self-contained file for offline browsing

Say, I made a web page which contains js, css and image files.比如说,我制作了一个包含 js、css 和图像文件的网页。 All of them reside in a folder.它们都驻留在一个文件夹中。 Is there any proven way to convert the whole folder into a self-contained file(can be html or anything a browser can open)?是否有任何行之有效的方法将整个文件夹转换为一个独立的文件(可以是 html 或任何浏览器可以打开的文件)? I'm wondering if such solution already exists.我想知道这样的解决方案是否已经存在。

Please note that I am already aware of 'Save Page' feature in browsers which saves the page and the other content in a separate folder.请注意,我已经知道浏览器中的“保存页面”功能可将页面和其他内容保存在单独的文件夹中。

There is a browser add-on called "Save Page WE".有一个名为“Save Page WE”的浏览器插件。 Works on Firefox and Chrome.适用于 Firefox 和 Chrome。

Firefox add-on: https://addons.mozilla.org/en-US/firefox/addon/save-page-we/火狐插件: https : //addons.mozilla.org/en-US/firefox/addon/save-page-we/

Chrome add-on: https://chrome.google.com/webstore/detail/save-page-we/dhhpefjklgkmgeafimnjhojgjamoafof Chrome 插件: https : //chrome.google.com/webstore/detail/save-page-we/dhhpefjklgkmgeafimnjhojgjamoafof

Saves the entire contents of a page as a single self-contained .html file.将页面的全部内容保存为一个独立的.html文件。 Perfect for archiving web pages for posterity非常适合为后代存档网页

made a web page which contains js, css and image files ... [is there a] way to convert the whole folder into a self-contained file?制作了一个包含 js、css 和图像文件的网页...... [有没有] 方法可以将整个文件夹转换为一个独立的文件?

I would recommend you try an HTML / Web Page / eBook Compiler.我建议您尝试使用 HTML/网页/电子书编译器。 These programs were developed in the late 90s / early 2000s and designed to do exactly what you are asking;这些程序是在 90 年代末 / 2000 年代初开发的,旨在完全满足您的要求; compile your HTML page(s) into a stand-alone file (though sadly these programs only work on Windows).将您的 HTML 页面编译成一个独立的文件(尽管遗憾的是这些程序只能在 Windows 上运行)。

Hit the search engines and try search terms such as:点击搜索引擎并尝试搜索词,例如:

  • HTML Compiler HTML 编译器
  • eBook Compiler电子书编译器
  • Web Page Executable网页可执行文件

If it's a single web page I'd just save it as a PDF.如果它是单个网页,我会将其另存为 PDF。 Is there a compelling reason not to?有没有令人信服的理由不这样做?

(I may be stating the obvious, but sometimes the simplest solutions are overlooked). (我可能说的是显而易见的,但有时会忽略最简单的解决方案)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM