add offline cache

This commit is contained in:
James Feng Cao 2022-09-13 16:33:31 +08:00
parent ad12551ed7
commit fe41bb41a4
10 changed files with 119 additions and 3 deletions

View File

@ -110,6 +110,15 @@ Toggle all checkboxes in forms
Enable selection</description>
</item>
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
<pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
<guid>/en/offlinecache/</guid>
<description>Corresponding files in &amp;quot;sitecache/[domain name]/[full path including filename, &#39;?&#39; , &#39;&amp;amp;&#39; , &#39;=&#39;. exactly as url]&amp;quot; are loaded with option &amp;quot;use offline resources&amp;quot;.</description>
</item>
<item>
<title>Resource redirection</title>
<link>/en/redirect/</link>

View File

@ -125,6 +125,12 @@
</a>
</li>
<li class="post">
<a href="offlinecache/index.html">
<span>Offline resources</span>
</a>
</li>
<li class="post">
<a href="redirect/index.html">
<span>Resource redirection</span>

View File

@ -64,7 +64,7 @@ Note: &#34;Engines&#34; needs file &#34;engine.search&#34;whose format is sam
<pubDate>Thu, 28 Jul 2022 00:00:00 +0000</pubDate>
<guid>/en/sitemap/</guid>
<description>UI Search engines UI (gitee) Customization Long pressing menus for toolbar buttons User agents Javascript Url services Links Commands Remote javascript Menu for selections Menu for long pressing hypertext Toolbar Gestures Address bar command modes Font settings Advanced Content AD blocking CSS styles Redirection Javascript and CSS for domains Tools Bookmarklets Custom file handling Html5 application Termux Miscellaneous Configuration files Tips Manual </description>
<description>UI Search engines UI (gitee) Customization Long pressing menus for toolbar buttons User agents Javascript Url services Links Commands Remote javascript Menu for selections Menu for long pressing hypertext Toolbar Gestures Address bar command modes Font settings Advanced Content AD blocking CSS styles Redirection Offline cache Javascript and CSS for domains Tools Bookmarklets Custom file handling Html5 application Termux Miscellaneous Configuration files Tips Manual </description>
</item>
<item>
@ -217,6 +217,15 @@ Performance
Remote javascript is defined in default.rjs. Click the following link to install. (Force exit and re-launch the app, then long press the &amp;quot;search&amp;quot; button to popup the menu.</description>
</item>
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
<pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
<guid>/en/offlinecache/</guid>
<description>Corresponding files in &amp;quot;sitecache/[domain name]/[full path including filename, &#39;?&#39; , &#39;&amp;amp;&#39; , &#39;=&#39;. exactly as url]&amp;quot; are loaded with option &amp;quot;use offline resources&amp;quot;.</description>
</item>
<item>
<title>Resource redirection</title>
<link>/en/redirect/</link>

View File

@ -0,0 +1,55 @@
<!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>Offline resources</title>
<script type="text/javascript">
function findLang(){
let href = location.href;
for(let i=href.length-1;i>0;i--){
if('/'==href.charAt(i) && '/'==href.charAt(i-3))
return i;
}
return 0;
}
function nav2(page){
let i = findLang();
location.href = location.href.substring(0,i+1)+page;
}
function nav2Lang(lang){
let i = findLang();
let href = location.href;
location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
}
</script>
</head>
<body>
<header class='header'>
<a class="logo" href="javascript:void(0)" onclick="return nav2('index.html')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html')">Tags</a>
<a class="logo" href="javascript:void(0)" onclick="return nav2Lang('zh')">简体中文</a>
<nav>
</nav>
</header>
<br />
<div class="container">
<h1 class="title">Offline resources
<br>
<span class="subtitle"></span>
</h1>
<ul class="tags">
</ul>
<p>Corresponding files in &quot;sitecache/[domain name]/[full path including filename, '?' , '&amp;' , '='. exactly as url]&quot; are loaded with option &quot;use offline resources&quot;.</p>
</div>
</body>
</html>

View File

@ -202,6 +202,19 @@
hreflang="en"
href="/en/rjs/"
/>
</url><url>
<loc>/en/offlinecache/</loc>
<lastmod>2022-04-25T00:00:00+00:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/offlinecache/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/offlinecache/"
/>
</url><url>
<loc>/en/tags/redirection/</loc>
<lastmod>2022-04-25T00:00:00+00:00</lastmod>

View File

@ -74,6 +74,7 @@
<li><a href="../adblock/index.html">AD blocking</a></li>
<li><a href="../globalcss/index.html">CSS styles</a></li>
<li><a href="../redirect/index.html">Redirection</a></li>
<li><a href="../offlinecache/index.html">Offline cache</a></li>
<li><a href="../sitejs/index.html">Javascript and CSS for domains</a></li>
</ul>
<h5 id="tools">Tools</h5>

View File

@ -32,7 +32,7 @@ Note: &#34;Engines&#34; needs file &#34;engine.search&#34;whose format is sam
<pubDate>Thu, 28 Jul 2022 00:00:00 +0000</pubDate>
<guid>/en/sitemap/</guid>
<description>UI Search engines UI (gitee) Customization Long pressing menus for toolbar buttons User agents Javascript Url services Links Commands Remote javascript Menu for selections Menu for long pressing hypertext Toolbar Gestures Address bar command modes Font settings Advanced Content AD blocking CSS styles Redirection Javascript and CSS for domains Tools Bookmarklets Custom file handling Html5 application Termux Miscellaneous Configuration files Tips Manual </description>
<description>UI Search engines UI (gitee) Customization Long pressing menus for toolbar buttons User agents Javascript Url services Links Commands Remote javascript Menu for selections Menu for long pressing hypertext Toolbar Gestures Address bar command modes Font settings Advanced Content AD blocking CSS styles Redirection Offline cache Javascript and CSS for domains Tools Bookmarklets Custom file handling Html5 application Termux Miscellaneous Configuration files Tips Manual </description>
</item>
<item>

View File

@ -1 +1,10 @@
<meta http-equiv="refresh" content="0; url=zh/index.html">
<!DOCTYPE html>
<html lang="en">
<head>
<title>en/</title>
<link rel="canonical" href="en/">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=en/">
</head>
</html>

View File

@ -30,6 +30,10 @@
<header class='header'>
<a class="logo" href="javascript:void(0)" onclick="return nav2('index.html')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html')">Tags</a>
<a class="logo" href="javascript:void(0)" onclick="return nav2Lang('en')">English</a>
<nav>
</nav>
</header>

View File

@ -495,5 +495,15 @@
<loc>/zh/tags/%E4%B8%8B%E8%BD%BD/</loc>
</url><url>
<loc>/zh/offlinecache/</loc>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/offlinecache/"
/>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/offlinecache/"
/>
</url>
</urlset>