summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/main.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/main.js b/js/main.js
index 34e0890..f3a59a4 100644
--- a/js/main.js
+++ b/js/main.js
@@ -3,6 +3,11 @@ define(function() {
var all_pages = 'home studying curriculum campus career'.split(' ');
+ var cacheBuster = '';
+ if (/dev/.test(location.search)) {
+ cacheBuster = '?t=' + (new Date()).getTime();
+ }
+
/* loads a page into view and execute scripts */
function loadContent(name, text) {
var contentElement = document.getElementById('content');
@@ -35,7 +40,7 @@ define(function() {
http.onload = function() {
loadContent(page, http.responseText);
};
- http.open('get', 'pages/' + page + '.html');
+ http.open('get', 'pages/' + page + '.html' + cacheBuster);
http.send(null);
return true;
}