Jordan Stewart 59f4da1d9d
fix problem with styles at the start of the server content (#1768)
fix problem with styles at the start of the server content when navigating through history
2023-09-21 12:10:04 -06:00

27 lines
951 B
HTML

<html lang="en">
<head>
<meta charset="utf-8" />
<script type="application/javascript" src="../../../src/htmx.js"></script>
<title>History - Index</title>
<meta name="htmx-config" content='{"historyCacheSize":2}'>
<script>
htmx.on("htmx:beforeHistorySave", function(evt){
console.log("Saving history : ", evt.detail);
console.log("History Cache Before:", JSON.parse(localStorage.getItem("htmx-history-cache")))
setTimeout(function () {
console.log("History Cache After:", JSON.parse(localStorage.getItem("htmx-history-cache")))
}, 10);
})
</script>
</head>
<body style="padding:20px;font-family: sans-serif" hx-boost="true">
<style>a, a:visited, h1 { color: cyan; border: 1px dotted magenta; }</style>
<h1>History Test</h1>
<a href="1.html">1</a>
<a href="2.html">2</a>
<a href="3.html">3</a>
<a href="4.html">4</a>
<h3>Index</h3>
</body>
</html>