File: script-bottom.html

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