index.html 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <link rel="stylesheet" href="../style.css#" type="text/css" />
  7. <title>Offline resources</title>
  8. <script>
  9. function findLang(){
  10. let href = location.href;
  11. for(let i=href.length-1;i>0;i--){
  12. if('/'==href.charAt(i) && '/'==href.charAt(i-3))
  13. return i;
  14. }
  15. return 0;
  16. }
  17. function nav2(page){
  18. let i = findLang();
  19. location.href = location.href.substring(0,i+1)+page;
  20. }
  21. function nav2Lang(lang){
  22. let i = findLang();
  23. let href = location.href;
  24. location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
  25. }
  26. </script>
  27. </head>
  28. <body>
  29. <header class='header'>
  30. <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>
  31. <a class="logo" href="javascript:void(0)" onclick="return nav2Lang('zh')">简体中文</a>
  32. <nav>
  33. </nav>
  34. </header>
  35. <br />
  36. <div class="container">
  37. <h1 class="title">Offline resources
  38. <br>
  39. <span class="subtitle"></span>
  40. </h1>
  41. <ul class="tags">
  42. </ul>
  43. <p>Offline resources locate in the folder &quot;sitecache&quot;. With the option &quot;use offline resources&quot; enabled, the corresponding files in &quot;sitecache/[domain name]/[full path including filename, the url path part]&quot; are loaded first before reaching the network.</p>
  44. <h4 id="serverless-local-sites">Serverless local sites</h4>
  45. <p><a href="i:01Extract webapp:i:0bsitecache/local/:">Click to install url service that extracts web apps to the folder &quot;sitecache/local/&quot;</a>: support web extensions (.crx for chrome &amp; .xpi for firefox).</p>
  46. <p>Any folder under &quot;sitecache&quot; can be visited as a local site. Urls with search queries can be dynamically processed by the js/wasm code in the local file.</p>
  47. <p>PWAs (Progresssive Web Applications) and some web extensions (.crx for chrome &amp; .xpi for firefox) are just packaged websites. Ex. the &quot;kiwix&quot; extension can be extracted to the folder &quot;sitecache/local/kiwix&quot;<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>, then the kiwix extension can be accessed via url &quot;https://local/kiwix/www/index.html#&quot; in the browser.</p>
  48. <div class="footnotes" role="doc-endnotes">
  49. <hr>
  50. <ol>
  51. <li id="fn:1">
  52. <p>the folder name &quot;local&quot; is used as the domain name in the url.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
  53. </li>
  54. </ol>
  55. </div>
  56. </div>
  57. <p>Last Modified: 8 April 2024<br>
  58. fix typos<br>
  59. <pre></pre>
  60. </p>
  61. <script id='jsgiscus'
  62. src='https://giscus.app/client.js'
  63. data-repo="torappinfo/uweb"
  64. data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
  65. data-category="Announcements"
  66. data-category-id="DIC_kwDOEgNLGc4CQjsh"
  67. data-mapping="title"
  68. data-strict="0"
  69. data-reactions-enabled="1"
  70. data-emit-metadata="0"
  71. data-input-position="top"
  72. data-theme="light"
  73. data-lang="en"
  74. data-loading="lazy"
  75. crossorigin="anonymous" async>
  76. </script>
  77. <footer class="site-footer">
  78. <div class="container">
  79. &copy; 2018-2024 Richard H. Cao
  80. </div>
  81. </footer>
  82. <!-- This document is licensed under the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at <https://www.gnu.org/licenses/>. -->
  83. </body>
  84. </html>