index.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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="canonical" href="https://jamesfengcao.gitlab.io/uweb/zh/offlinecache/" />
  7. <link rel="stylesheet" href="../style.css#" type="text/css" />
  8. <title>装载网站离线资源</title>
  9. <script>
  10. function findLang(){
  11. let href = location.href;
  12. for(let i=href.length-1;i>0;i--){
  13. if('/'==href.charAt(i) && '/'==href.charAt(i-3))
  14. return i;
  15. }
  16. return 0;
  17. }
  18. function nav2(page){
  19. let i = findLang();
  20. location.href = location.href.substring(0,i+1)+page;
  21. }
  22. function nav2Lang(lang){
  23. let i = findLang();
  24. let href = location.href;
  25. location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
  26. }
  27. </script>
  28. </head>
  29. <body>
  30. <header class='header'>
  31. <a class="logo" href="javascript:void(0)" onclick="return nav2('index.html#')">首页</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html#')">标签</a>
  32. <a class="logo" href="javascript:void(0)" onclick="return nav2Lang('en')">English</a>
  33. <nav>
  34. </nav>
  35. </header>
  36. <br />
  37. <div class="container">
  38. <h1 class="title">装载网站离线资源
  39. <br>
  40. <span class="subtitle"></span>
  41. </h1>
  42. <ul class="tags">
  43. </ul>
  44. <p><a href="..">uweb浏览器</a>支持装载网站离线资源。只需要将离线资源存为文件&quot;sitecache/[域名]/[全部路径,包括文件名,url中的路径部分]&quot;。<br>
  45. 打开选项&quot;使用离线资源&quot;以后超微将自动装载这些离线资源。</p>
  46. <p>离线资源可作为缓存提高浏览器性能; 可作为国外网站部分备份修复服务访问; 也可替换部分网站资源达到定制网站的作用。</p>
  47. </div>
  48. <p>Last Modified: 2 April 2024<br>
  49. generate PDF for custom paper size<br>
  50. <pre></pre>
  51. </p>
  52. <script id='jsgiscus'
  53. src='https://giscus.app/client.js'
  54. data-repo="torappinfo/uweb"
  55. data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
  56. data-category="Announcements"
  57. data-category-id="DIC_kwDOEgNLGc4CQjsh"
  58. data-mapping="title"
  59. data-strict="0"
  60. data-reactions-enabled="1"
  61. data-emit-metadata="0"
  62. data-input-position="top"
  63. data-theme="light"
  64. data-lang="en"
  65. data-loading="lazy"
  66. crossorigin="anonymous" async>
  67. </script>
  68. <footer class="site-footer">
  69. <div class="container">
  70. &copy; 2018-2024 Richard H. Cao
  71. </div>
  72. </footer>
  73. <!-- 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/>. -->
  74. </body>
  75. </html>