Skip to content

Instantly share code, notes, and snippets.

@coleww
Created August 31, 2014 18:25
Show Gist options
  • Save coleww/c3ed70d8ec49e848327a to your computer and use it in GitHub Desktop.
Save coleww/c3ed70d8ec49e848327a to your computer and use it in GitHub Desktop.
HTML 5 Single Page Web Application Template
<!--telling the web browser and the user that we mean business-->
<!doctype='HTML5'>
<head>
<!--going HTML5 is basically like saying you don't care about like 3/4 of all internet users, but whatever! THIS IS THE BLEEDING EDGE OF TECHNOLOGY-->
<title>Hello Chrome Users!</title>
<!-- yr SEO and 'social' meta tags would go here-->
</head>
<body>
<!--yr html5 document should have a single div which yr Javascript Single Page Web Application hooks it's filthy teeth into-->
<div id="container"></div>
<!--$ is very important-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!--Application Logic-->
<script>
// here we are telling the javascript to be very strict
'use strict;'
// here we tell jquery to wait until
$(function(){
// this right here is the most important part of any Single Page Web Application
// it is how you tell the web browser to NEVER EVER EVER refresh the page no matter what
window.location.href += '#/'
window.location.navigate = undefined;
window.location.href = undefined;
// I still feel insecure about this, i must be forgetting something?
});
</script>
</body>
@coleww
Copy link
Author

coleww commented Aug 31, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment