You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
2.3 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/uwebzh/style.css" type="text/css" />
<title>装载网站离线资源</title>
</head>
<body>
<header class='header'>
<a class="logo" href="/uwebzh">Home</a> <a class="logo" href="/uwebzh/tags/">Tags</a>
<nav>
</nav>
</header>
<br />
<div class="container">
<h1 class="title">装载网站离线资源
<br>
<span class="subtitle"></span>
</h1>
<ul class="tags">
</ul>
<p><a href="..">uweb浏览器</a>支持装载网站离线资源。只需要将离线资源存为文件&quot;/sdcard/uweb/sitecache/[域名]/[全部路径,包括文件名,?,&amp;,=, 与url一模一样]&quot;。如果应用内部目录有文件夹&quot;sitejs&quot;存在,则“/sdcard/uweb”下的离线资源不再生效此时生效离线资源为内部目录下的&quot;sitecache&quot;文件夹。</p>
<p>打开选项以后超微将自动装载这些离线资源。</p>
<p>离线资源可作为缓存提高浏览器性能; 可作为国外网站部分备份修复服务访问; 也可替换部分网站资源达到定制网站的作用。</p>
<p>下面以google翻译为例说明如何发现并备份离线资源。</p>
<ul>
<li>首先使用教程&quot;<a href="../rjs">运行远程javascript</a>&quot;配置google翻译。</li>
<li>将文件&quot;/sdcard/uweb/types.sniff&quot;内容清空(不要删除文件,否则会恢复成默认文件)。重启浏览器以后长按设置打开资源嗅探。</li>
<li>准备好合适手段保证google系网站能正常访问长按按钮在主屏运行google翻译。</li>
<li>出现google翻译工具条以后长按设置关闭嗅探。</li>
<li>运行termux安装下载工具wget<br>
<code>apt update;apt install wget</code></li>
<li>下载必要离线数据termux下运行如下命令
<pre><code>cd /sdcard/uweb
mkdir sitecache
cd sitecache
wget -U 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)' -x -i ../sniff.log</code></pre>
</li>
<li>下载结束后,离线资源就准备妥当,供以后随时使用。</li>
<li>google翻译的情况下要对部分js作修改防止每次访问url不同。</li>
</ul>
</div>
</body>
</html>