Skip to content

Instantly share code, notes, and snippets.

@lucasreta
Last active December 30, 2020 14:23
Show Gist options
  • Save lucasreta/2c4ac83f66d5b9979aa20a6c71876667 to your computer and use it in GitHub Desktop.
Save lucasreta/2c4ac83f66d5b9979aa20a6c71876667 to your computer and use it in GitHub Desktop.
vanilla-spa
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Welcome | App Manual</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<header>
<h1>Vanilla JS SPA</h1>
<nav>
<ul>
<li><a class="link" href="/section-1">Link #1</a></li>
<li><a class="link" href="/section-2">Link #2</a></li>
</ul>
</nav>
</header>
<main>
<section id="content_box"></section>
<hr>
<p>This small site demonstrates how one can create a SPA that handles routing and history changes.</p>
<p>It was made as a simple proof of concept to answer <a alt="How to handle this breaking behavior of the refresh button of the browser after making an AJAX HTTP GET request?" title="How to handle this breaking behavior of the refresh button of the browser after making an AJAX HTTP GET request?" href="https://stackoverflow.com/questions/64405705/how-to-handle-this-breaking-behavior-of-the-refresh-button-of-the-browser-after" target="_blank">this question.</a></p>
</main>
</body>
</html>
<script type="text/javascript" src="script.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment