Skip to content

Instantly share code, notes, and snippets.

@jimmyjacobson
Created August 27, 2011 22:26
Show Gist options
  • Save jimmyjacobson/1175944 to your computer and use it in GitHub Desktop.
Save jimmyjacobson/1175944 to your computer and use it in GitHub Desktop.
Redirecting using javascript
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/ strict.dtd">
2
3 <html lang="en"> <head> <meta charset=utf-8>
4 <script src="/javascripts/jquery-1.6.2.min.js"></script>
6 <script lang="text/javascript">
7 $(document).ready(function() {
8 window.location = "/path/to/content?ts={{version number}}";
9 });
10 </script>
11 </html>
@munroebot
Copy link

ok that is what I thought...doesn't help my embedded js issues, but will just move it to external.

@munroebot
Copy link

Oh nevermind - now I get it - this would be what the person bookmarks? Cool..

@jimmyjacobson
Copy link
Author

Yup, and everytime you update the main file you just change the {{version number}} to something new. That way ou cache when needed.

@munroebot
Copy link

So one question though. Wouldn't this page just get cached as well? So it would always be stuck with the same {{version number}}?

Shouldn't we set like or something?

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