index.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta
  7. name="viewport"
  8. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
  9. />
  10. <title>清理缓存</title>
  11. </head>
  12. <body>
  13. <h2>缓存</h2>
  14. <p>缓存是使用微信过程中产生的临时数据,清理缓存不会影响微信的正常使用。</p>
  15. <button type="button" onclick="clearAll()">清理</button>
  16. <script src="./static/js/vconsole.min.js"></script>
  17. <script src="./static/js/storage.min.js"></script>
  18. <script>
  19. // https://wx.palmnest.com/super_cloud/wx/main_debug/index.html
  20. // init vConsole
  21. var vConsole = new VConsole();
  22. console.log("Hello vConsole");
  23. const storage = window.Storage;
  24. console.log(storage);
  25. document.addEventListener("DOMContentLoaded", function () {
  26. console.log("DOMContentLoaded");
  27. });
  28. function clearAll() {
  29. storage.clear();
  30. storage.session.clear();
  31. }
  32. </script>
  33. </body>
  34. </html>