Debian Codegraph @

test/script.html

raw
1 <!doctype html>
2 <html class="no-js">
3 <head>
4 <meta charset="utf-8"/>
5 <title>Test: SCRIPT SRC in &lt;head&gt;</title>
6 <link rel="stylesheet" href="style.min.css" />
7 <script>
8 // calculate difference between zero and window.onload
9 window.onload = function () {
10 var stop = new Date();
11 document.getElementById("content").style.display = "block";
12 document.getElementById("ms").innerHTML = (stop - start);
13 };
14 </script>
15 <script>
16 var start = new Date();
17 </script>
18 <script src="http://ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js"></script>
19 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
20 <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js"></script>
21 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
22 <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
23 </head>
24 <body>
25 <div id="wrap">
26 <div id="nav" class="clear">
27 <a href="script.html">SCRIPT SRC <em>in head</em></a>
28 <a href="script-bottom.html">SCRIPT SRC <em>on bottom</em></a>
29 <a href="headjs.html">head.js <em>on head</em></a>
30 <br />
31 </div>
32 <div id="content" style="display: none">
33 <h1>SCRIPT SRC before &lt;/head&gt;</h1>
34 <div id="time"><span id="ms"></span> ms</div>
35 <p>
36 Press <strong>CTRL+SHIFT+R</strong> or <strong>CTRL+F5</strong> to reload with an <strong>empty cache</strong> = first impression.
37 </p>
38 <br />
39 <p>
40 <strong>View source</strong> to see how scripts are provided.
41 </p>
42 <p>
43 Time is calculated when <code>window.onload</code> fires.
44 </p>
45 <p>
46 Try with different browsers. The time difference varies a lot.
47 </p>
48 <p class="details">
49 head.js() calls are always separate from the page rendering. Does not matter
50 whether you load on HEAD or on bottom. You can also load programmatically on
51 demand.
52 </p>
53 </div>
54 <div id="footer">
55 <a href="/site/unit.html">&laquo; Back</a>
56 &nbsp; | &nbsp; <a href="https://github.com/headjs/headjs/issues">found a bug?</a>
57 </div>
58 </div>
59 </body>
60 </html>