Skip to content

Commit b65a7a6

Browse files
committed
Microtime all CSS and JS paths to help stop caching
1 parent 3dc2652 commit b65a7a6

12 files changed

Lines changed: 35 additions & 33 deletions

editor.php

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,37 @@
1010
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> editor</title>
1111
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
1212
<meta name="robots" content="noindex, nofollow">
13-
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css">
14-
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/hint/show-hint.css">
15-
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/lint/lint.css">
13+
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css?microtime=<?php echo microtime(true);?>">
14+
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/hint/show-hint.css?microtime=<?php echo microtime(true);?>">
15+
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/lint/lint.css?microtime=<?php echo microtime(true);?>">
1616
<!--
1717
codemirror-compressed.js
1818
incls: codemirror
1919
modes: clike, coffeescript, css, erlang, go, htmlmixed, javascript, julia, lua, markdown, perl, php, python, ruby, rust, sass, sql, xml, yaml
2020
addon: brace-fold, closebrackets, closetag, css-hint, html-hint, javascript-hint, javascript-lint, lint, match-highlighter, searchcursor, show-hint, sql-hint, trailingspace, xml-fold, xml-hint
2121
//-->
22-
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js"></script>
22+
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js?microtime=<?php echo microtime(true);?>"></script>
2323
<?php
2424
if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint-2.5.6.min.js")) {
25-
echo '<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fplugins%2Fjshint%2Fjshint-2.5.6.min.js%3Cspan+class%3D"x x-first x-last">"></script>';
25+
echo '<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fplugins%2Fjshint%2Fjshint-2.5.6.min.js%3Cspan+class%3D"x x-first">?microtime='.microtime(true).'></script>';
2626
};?>
27-
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Fmmd.js"></script>
28-
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffoldcode.js"></script>
27+
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Fmmd.js%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>"></script>
28+
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffoldcode.js%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>"></script>
2929
<?php
3030
if (file_exists(dirname(__FILE__)."/plugins/emmet/emmet.min.js")) {
31-
echo '<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fplugins%2Femmet%2Femmet.min.js"></script>';
31+
echo '<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fplugins%2Femmet%2Femmet.min.js%3Cspan+class%3D"x x-first x-last">?microtime=".microtime(true)."></script>';
3232
};?>
3333
<?php
3434
if (file_exists(dirname(__FILE__)."/plugins/pesticide/pesticide.js")) {
35-
echo '<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fplugins%2Fpesticide%2Fpesticide.js"></script>';
35+
echo '<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fplugins%2Fpesticide%2Fpesticide.js%3Cspan+class%3D"x x-first x-last">?microtime=".microtime(true)."></script>';
3636
};?>
3737
<?php
3838
if (file_exists(dirname(__FILE__)."/plugins/stats.js/stats.min.js")) {
39-
echo '<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fplugins%2Fstats.js%2Fstats.min.js"></script>';
39+
echo '<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fplugins%2Fstats.js%2Fstats.min.js%3Cspan+class%3D"x x-first x-last">?microtime=".microtime(true)."></script>';
4040
};?>
4141
<link rel="stylesheet" href="<?php
4242
if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';};
43+
echo "?microtime=".microtime(true);
4344
$activeLineBG = array_search($ICEcoder["theme"],array("3024-day","base16-light","eclipse","elegant","neat","solarized","xq-light")) !== false ? "#ccc" : "#000";
4445
?>">
4546

@@ -74,8 +75,8 @@
7475
.diffGreyLighter {background: #888 !important; color: #222 !important}
7576
.diffNone {}
7677
</style>
77-
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffile-types.css">
78-
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffile-type-icons.css">
78+
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffile-types.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
79+
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffile-type-icons.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
7980
</head>
8081

8182
<body style="color: #fff; margin: 0" onKeyDown="return top.ICEcoder.interceptKeys('content', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">

files.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<head>
1313
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> file manager</title>
1414
<meta name="robots" content="noindex, nofollow">
15-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffiles.css">
16-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffile-types.css">
17-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffile-type-icons.css">
18-
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Fice-coder%3Cspan+class%3D"pl-ent"><?php if (!$ICEcoder['devMode']) {echo '.min';};?>.js" type="text/javascript"></script>
15+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffiles.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
16+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffile-types.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
17+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Ffile-type-icons.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
18+
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Flib%2Fice-coder%3Cspan+class%3D"pl-ent"><?php if (!$ICEcoder['devMode']) {echo '.min';}; echo ".js?microtime=".microtime(true);?>" type="text/javascript"></script>
1919
</head>
2020

2121
<body onFocus="top.ICEcoder.files.style.background='#444'" onBlur="top.ICEcoder.files.style.background='#383838'" onload="top.ICEcoder.showHideGithubNav(top.ICEcoder.githubDiff ? 'show' : 'hide')" onDblClick="top.ICEcoder.openFile()" onKeyDown="return top.ICEcoder.interceptKeys('files', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">

lib/github-manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> GitHub manager</title>
169169
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
170170
<meta name="robots" content="noindex, nofollow">
171-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fgithub-manager.css">
171+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fgithub-manager.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
172172
</head>
173173

174174
<body class="githubManager">

lib/github.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
echo '<!DOCTYPE html>
2424
<html>
2525
<head>
26-
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fgithub.js"></script>
26+
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fgithub.js%3Cspan+class%3D"x x-first x-last">?microtime=<?php echo microtime(true);?>"></script>
2727
</body>
2828
<script>
2929
top.ICEcoder.githubAuthTokenSet = true;
@@ -47,8 +47,8 @@
4747
echo '<!DOCTYPE html>
4848
<html>
4949
<head>
50-
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fgithub.js"></script>
51-
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Funderscore-min.js"></script>
50+
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fgithub.js%3Cspan+class%3D"x x-first x-last">?microtime=<?php echo microtime(true);?>"></script>
51+
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Funderscore-min.js%3Cspan+class%3D"x x-first x-last">?microtime=<?php echo microtime(true);?>"></script>
5252
</body>
5353
<script>
5454
// Start our github object, establish this repo & file path
@@ -153,8 +153,8 @@
153153
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> GitHub commit files</title>
154154
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
155155
<meta name="robots" content="noindex, nofollow">
156-
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fgithub.js"></script>
157-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fgithub.css">
156+
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fgithub.js%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>"></script>
157+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fgithub.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
158158
</head>
159159

160160
<body class="githubAction">

lib/help.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> help</title>
1111
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
1212
<meta name="robots" content="noindex, nofollow">
13-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fhelp.css">
13+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fhelp.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
1414
</head>
1515

1616
<body class="help">

lib/login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
1515
<meta name="robots" content="noindex, nofollow">
1616
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
17-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fice-coder.css">
17+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fice-coder.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
1818
<link rel="icon" type="image/png" href="../favicon.png">
1919
</head>
2020

lib/multiple-results.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> multiple results screen</title>
1616
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
1717
<meta name="robots" content="noindex, nofollow">
18-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fmultiple-results.css">
18+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fmultiple-results.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
1919
</head>
2020

2121
<body class="results" onLoad="top.get('loadingMask').style.visibility = 'hidden'">

lib/plugins-manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function deletePlugin($dir) {
193193
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> plugins manager</title>
194194
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
195195
<meta name="robots" content="noindex, nofollow">
196-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fplugins-manager.css">
196+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fplugins-manager.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
197197
</head>
198198

199199
<body class="pluginsManager">

lib/properties.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> file/folder properties</title>
1818
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
1919
<meta name="robots" content="noindex, nofollow">
20-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fproperties.css">
20+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fproperties.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
2121
</head>
2222

2323
<body class="properties">

lib/settings-screen.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> settings screen</title>
1111
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
1212
<meta name="robots" content="noindex, nofollow">
13-
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fsettings-screen.css">
14-
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F..%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css">
15-
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2F..%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js"></script>
13+
<link rel="stylesheet" type="text/css" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fsettings-screen.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
14+
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F..%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css?microtime=<?php echo microtime(true);?>">
15+
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2F..%2F%3Cspan+class%3D"pl-ent"><?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js?microtime=<?php echo microtime(true);?>"></script>
1616

1717
<style type="text/css">
1818
.CodeMirror {position: absolute; width: 409px; height: 180px; font-size: <?php echo $ICEcoder["fontSize"];?>}
@@ -21,7 +21,7 @@
2121
.cm-tab {border-left-width: <?php echo $ICEcoder["visibleTabs"] ? "1px" : "0";?>; margin-left: <?php echo $ICEcoder["visibleTabs"] ? "-1px" : "0";?>; border-left-style: solid; border-left-color: rgba(255,255,255,0.2)}
2222
</style>
2323

24-
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Feditor.css">
24+
<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Feditor.css%3Cspan+class%3D"x x-first">?microtime=<?php echo microtime(true);?>">
2525
<?php
2626
$themeArray = array();
2727
$handle = opendir('../'.$ICEcoder["codeMirrorDir"].'/theme/');
@@ -32,7 +32,7 @@
3232
}
3333
sort($themeArray);
3434
for ($i=0;$i<count($themeArray);$i++) {
35-
echo '<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F..%2F%3C%2Fspan%3E".$ICEcoder["codeMirrorDir"].'/theme/'.$themeArray[$i].'.css">'.PHP_EOL;
35+
echo '<link rel="stylesheet" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F..%2F%3C%2Fspan%3E".$ICEcoder["codeMirrorDir"].'/theme/'.$themeArray[$i].'.css?microtime=<?php echo microtime(true);?>">'.PHP_EOL;
3636
}
3737
?>
3838
</head>

0 commit comments

Comments
 (0)