| 1 | <html lang="en"> |
| 2 | <head> |
| 3 | <meta charset="utf-8" /> |
| 4 | <script type="application/javascript" src="../../../src/htmx.js"></script> |
| 5 | <title>History - Index</title> |
| 6 | <meta name="htmx-config" content='{"historyCacheSize":2}'> |
| 7 | <script> |
| 8 | htmx.on("htmx:beforeHistorySave", function(evt){ |
| 9 | console.log("Saving history : ", evt.detail); |
| 10 | console.log("History Cache Before:", JSON.parse(sessionStorage.getItem("htmx-history-cache"))) |
| 11 | setTimeout(function () { |
| 12 | console.log("History Cache After:", JSON.parse(sessionStorage.getItem("htmx-history-cache"))) |
| 13 | }, 10); |
| 14 | }) |
| 15 | </script> |
| 16 | </head> |
| 17 | <body style="padding:20px;font-family: sans-serif" hx-boost="true"> |
| 18 | <style>a, a:visited, h1 { color: cyan; border: 1px dotted magenta; }</style> |
| 19 | <h1>History Test</h1> |
| 20 | <a href="1.html">1</a> |
| 21 | <a href="2.html">2</a> |
| 22 | <a href="3.html">3</a> |
| 23 | <a href="4.html">4</a> |
| 24 | <h3>Index</h3> |
| 25 | </body> |
| 26 | </html> |