Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 63 lines (60 sloc) 1.776 kb
194d018 Dustin Diaz create benchmark pages
authored
1 <!DOCTYPE HTML>
2 <html lang="en-us">
3 <head>
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5 <title>head.js benchmarks</title>
6 <style type="text/css">
7 body {
8 width: 650px;
9 margin: 10px auto;
10 font: 300 16px 'helvetica neue', helvetica, arial;
11 }
12 h1 {
13 border-bottom: 3px solid #333;
14 }
15 strong {
16 font-weight: bold;
17 }
18 #window-ms,
19 #dom-ms {
20 font-weight: bold;
21 font-size: 20px;
22 }
23 </style>
24 <script src="../vendor/head.js"></script>
25 <script type="text/javascript">
26 var start = (+new Date),
27 onloadTime = 0,
28 libsReady = 0;
29 window.onload = function() {
30 document.getElementById('window-ms').innerHTML = (+new Date) - start;
31 };
32 // load a bunch of libraries
a09058b Dustin Diaz - update benchmarks
authored
33 head.js('../vendor/yui-utilities.js?' + start, function() {
194d018 Dustin Diaz create benchmark pages
authored
34 YAHOO.util.Dom.get('yui').innerHTML = '';
35 });
9f4e064 Dustin Diaz add benchmark pages similar to head.js
authored
36
a09058b Dustin Diaz - update benchmarks
authored
37 head.js('../vendor/mootools.js?' + start, function() {
e4dd574 Dustin Diaz make headjs do proper checks in benchmarks
authored
38 document.id('mootools').set('html', '');
194d018 Dustin Diaz create benchmark pages
authored
39 });
9f4e064 Dustin Diaz add benchmark pages similar to head.js
authored
40
a09058b Dustin Diaz - update benchmarks
authored
41 head.js('../vendor/jquery.js?' + start, function() {
e4dd574 Dustin Diaz make headjs do proper checks in benchmarks
authored
42 $('#jquery').html('');
194d018 Dustin Diaz create benchmark pages
authored
43 });
9f4e064 Dustin Diaz add benchmark pages similar to head.js
authored
44
194d018 Dustin Diaz create benchmark pages
authored
45 head.ready(function() {
46 document.getElementById('total').innerHTML = (+new Date) - start;
47 });
48 </script>
49 </head>
50 <body>
1c4526e Dustin Diaz cleaner benchmark pages. faster faster. faster. and a bird was added too...
authored
51 <h1>Benchmark Test</h1>
194d018 Dustin Diaz create benchmark pages
authored
52 <div id="ready">
1c4526e Dustin Diaz cleaner benchmark pages. faster faster. faster. and a bird was added too...
authored
53 <img src="../vendor/bird.png">
194d018 Dustin Diaz create benchmark pages
authored
54 <p>window.onload time: <span id="window-ms">0</span>ms</p>
55 <ul>
56 <li>YUI: <span id="yui"></span></li>
57 <li>jQuery: <span id="jquery"></span></li>
58 <li>Mootools: <span id="mootools"></span></li>
1c4526e Dustin Diaz cleaner benchmark pages. faster faster. faster. and a bird was added too...
authored
59 <li>Total: <strong id="total">0</strong>ms using head.js</li>
194d018 Dustin Diaz create benchmark pages
authored
60 </ul>
61 </div>
62 </body>
9f4e064 Dustin Diaz add benchmark pages similar to head.js
authored
63 </html>
Something went wrong with that request. Please try again.