Skip to content

Instantly share code, notes, and snippets.

@digfish
Created December 5, 2022 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digfish/9eee6aafba8cc4925d1c5a930ddcdd52 to your computer and use it in GitHub Desktop.
Save digfish/9eee6aafba8cc4925d1c5a930ddcdd52 to your computer and use it in GitHub Desktop.
Redirect to mirrored page in archive.org in case something goes wrong
<html>
<head>
<script>
function archiveorgcacheurl() {
origurl = location.href;
url = new URL(origurl);
console.log(url);
return "https://web.archive.org/web/" + url.protocol + "//" + url.hostname;
}
</script>
<style type="text/css">
body {
text-align: center;
}
</style>
</head>
<body>
<h1>An error...ups!</h1>
<p><img src="assets/spinning-wheel.gif"></p>
While the error is not solved you can visit a mirrored copy at <A href="javascript:" onclick="this.href=archiveorgcacheurl()">WaybackMachine Cache Page</A>
<h2>Redirecting you automatically... Please wait...</h2>
</body>
<script type="text/javascript">
setTimeout(function() {
location.href = archiveorgcacheurl();
},5000);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment