-
Notifications
You must be signed in to change notification settings - Fork 1
/
index_2012.html
2613 lines (2213 loc) · 81.3 KB
/
index_2012.html
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML>
<html>
<head>
<!--[if gte IE 9]><meta http-equiv="X-UA-Compatible" content="IE=edge" /><![endif]-->
<!--[if lt IE 9]><meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" /><![endif]-->
<meta charset="utf-8" />
<title>Mobile Web Performance</title>
<!--
Made by: Estelle Weyl
Copyright: CC-SA-NC-BY - Creative Commons Attribution-NonCommercial-ShareAlike
-->
<style>
:root {font-size: 125%;}
div, section {background-repeat:no-repeat;}
body {
font-family:Helvetica, "Trebuchet MS",Arial, sans-serif, 'Droid Sans';
padding: 0;
margin: 0;
width: 100%;
height: 100%;
position: absolute;
left: 0px; top: 0px;
}
.bigger {font-size: 120%;}
#info {
font-size: small;
position: absolute;
bottom: 0px;
left: 40%;
z-index: 500;
color: #fff;
}
/* optional */
#topinfo {
font-size: small;
position: absolute;
top: 5px;
right: 5px;
z-index: 500;
}
.key {
color: black;
display: inline-block;
padding: 3px 3px 3px 3px;
text-shadow: none;
letter-spacing: 0;
position: relative;
background: white;
border-radius: 5px;
font-weight: bold;
text-shadow: 0 0 1px currentColor;
}
#presentation {
position: absolute;
height: 100%;
width: 100%;
left: 0px;
top: 0px;
display: block;
overflow: hidden;
font-family: Helvetica, Arial, sans-serif;
background-color: rgba(255,255,255,0);
background-image: -webkit-gradient(linear, left top, right top, color-stop(0.70, rgba(255,255,255,0)), color-stop(0.3, rgba(255,255,255,0.5)));
background: -webkit-linear-gradient(0, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 100%);
background: -moz-linear-gradient(0, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 100%);
background: -ms-linear-gradient(0, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 100%);
background: -o-linear-gradient(0, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 100%);
background: linear-gradient(0, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 100%);
-moz-background-size: 7px 7px;
background-size: 7px 7px;
background-repeat: repeat;
background-color: #C5CCD4;
transition: 1s;
}
body > header, body > footer {
width: 100%;
box-sizing: border-box;
font-size: 2rem;
position: absolute;
top: 0;
z-index: 500;
background-image: -webkit-gradient(linear, 0% 0%, 0% 50%, from(rgba(176, 188, 205, 1)), to(rgba(129, 149, 175, 1)));
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.0) 100%);
background-image: -moz-linear-gradient(top, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.0) 100%);
background-image: -ms-linear-gradient(top, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.0) 100%);
background-image: -o-linear-gradient(top, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.0) 100%);
background-image: linear-gradient(to bottom, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.0) 100%);;
padding: 7px 10px;
background-color: #8195AF;
display: block;
height: 42px;
border-bottom: 1px solid #2C3542;
border-top: 1px solid #CDD5DF;
-webkit-transition: 1s;
}
body > header h1 {
color: white;
font-family: Helvetica;
font-size: 1.1rem;
font-weight: bold;
margin: auto;
overflow: hidden;
text-align: center;
text-overflow: ellipsis;
text-shadow: rgba(0, 0, 0, 0.4) 0px -1px 0px;
letter-spacing: -1px;
white-space: nowrap;
max-width: 400px;
}
@media screen and (orientation: portrait){
body > header,
body > footer,
body #next, body #back,
#presentation {
background-color:indianred;
}
}
@media screen and (max-width: 500px){
body > header,
body > footer,
body #next, body #back,
#presentation {
background-color:goldenrod;
}
}
.slides {
padding-top: 10px;
padding-bottom: 10px;
width: 100%;
height: 100%;
left: 0;
top: 0;
position: absolute;
display: block;
-webkit-transition: -webkit-transform 1s ease-in-out;
-moz-transition: -moz-transform 1s ease-in-out;
-ms-transition: -ms-transform 1s ease-in-out;
-o-transition: -o-transform 1s ease-in-out;
transition: transform 1s ease-in-out;
-webkit-transform: scale(0.8);
-moz-transform: scale(0.8);
-ms-transform: scale(0.8);
-o-transform: scale(0.8);
transform: scale(0.8);
}
.slide {
display: none;
position: absolute;
overflow: hidden;
width: 900px;
height: 700px;
left: 50%;
top: 50%;
margin-top: -350px;
background-color: #eee;
-webkit-transition: all 0.25s ease-in-out;
-moz-transition: all 0.25s ease-in-out;
-ms-transition: all 0.25s ease-in-out;
-o-transition: all 0.25s ease-in-out;
transition: all 0.25s ease-in-out;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
padding-left: 20px;
padding-top: 10px;
background-color: #ffffff;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
border: 2px solid #A8ABAE;
}
.slide.intro {
text-align: center;
font-size: 2rem;
}
.slide.intro header h1 {
font-size: 3rem;
}
.slide.intro hgroup {
margin-top: 200px;
}
.slide textarea.mynotes {
-webkit-appearance: none;
border: 1px #aaa solid;
border-radius: 5px;
width: 100%;
font-size: 1.2rem;
font-style: italic;
box-shadow: inset 0 0 8px rgba(0,0,0,0.3);
padding: 5px;
box-sizing: border-box;
font-family:"Palatino Linotype", "Book Antiqua", Palatino, cursive,serif;
}
.content td {
border: 1px solid black;
}
.invalid {
background-color: red;
}
.slide.section,.slide.intro {
text-align: center;
}
.slide.section,.slide.intro header {
font-size: 2.5rem;
}
.slide li {
margin-bottom: 10px;
}
.slide img {
max-height: 90%;
text-align: center;
}
.slide .counter {
color: #999999;
position: absolute;
left: 20px;
bottom: 20px;
display: block;
font-size: 0.7rem;
}
.slide.title > .counter,
.slide.segue > .counter,
.slide.mainTitle > .counter {
display: none;
}
.force-render {
display: block;
visibility: hidden;
}
.slide.far-past {
display: block;
margin-left: -2400px;
}
.slide.past {
visibility: visible;
display: block;
margin-left: -1400px;
}
.slide.current {
visibility: visible;
display: block;
margin-left: -450px;
}
.slide.future {
visibility: visible;
display: block;
margin-left: 500px;
}
.slide.far-future {
display: block;
margin-left: 1500px;
}
/* Content */
.slide header {
font-weight: normal;
letter-spacing: -.05em;
text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
left: 30px;
top: 25px;
font-size: 2rem;
}
h1 {
font-size:2rem;
margin-bottom: 0px;
}
h2 {
font-size: 1.6rem;
}
h1:first-child {
margin-top: 0;
}
section, footer {
text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
margin: 20px 30px 0;
display: block;
overflow: hidden;
}
footer {
font-size: 1rem;
margin: 20px 0 0 30px;
}
a {
color: inherit;
display: inline-block;
text-decoration: none;
line-height: 110%;
}
a, .em {
color: #E65F00;
}
a:hover {
text-decoration: underline;
}
pre {
text-align: left;
font-size: 1.4rem;
padding: 10px 20px;
background: rgba(218,218,220, 0.5);
-moz-border-radius: 8px;
border-radius: 8px;
border: 1px solid white;
}
pre b {
font-weight: normal;
color: #c61800;
text-shadow: #c61800 0 0 1px;
/*letter-spacing: -1px;*/}
pre em {
font-weight: normal;
font-style: normal;
color: #18a600;
text-shadow: #18a600 0 0 1px;
}
div.example {
display: block;
padding: 10px 20px;
background: rgba(255, 255, 255, 0.4);
border-radius: 8px;
margin-bottom: 10px;
border: 1px solid rgba(0, 0, 0, 0.2);
}
#presentation-counter {
color: #ccc;
font-size: 0.7rem;
letter-spacing: 1px;
position: absolute;
top: 40%;
left: 0;
width: 100%;
text-align: center;
}
#next,
#back {
z-index: 1000;
position:absolute;
top: 5px;
left: 5px;
list-style-type: none;
-webkit-appearance: none;
border: none;
padding: 5px 10px;
letter-spacing:1px;
font-size: 1rem;
box-shadow: inset 0 0 2px rgba(0,0,0,0.3),
2px 2px 5px rgba(0,0,0,0.7);
border: 3px solid #eee;
color: white;
text-decoration: none;
background-image: -webkit-gradient(linear, top, bottom, from(rgba(255, 255, 255, 0.4)), to(rgba(255, 255, 255, 0.1)));
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
background-image: -ms-linear-gradient(top, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
overflow: hidden;
max-width: 3rem;
white-space: nowrap;
font-family: Helvetica;
font-size: 14px;
-moz-border-radius: 4px;
border-radius: 4px;
height: 22px;
line-height: 22px;
padding: 0 10px;
-moz-background-size: 100% 50%;
background-size: 100% 50%;
background-repeat: no-repeat;
border: 1px solid #2F353E;
-moz-box-shadow: 0 1px 0 rgba(255,255,255, 0.4), inset 0 1px 0 rgba(255,255,255,0.4);
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
float: right;
background-color: #2463DE;
}
#next {
left: auto; right: 5px;
background-color: #4A6C9B;
border-color: #2F353E #375073 #375073;
}
.books {
-webkit-transform:scale(0.9);
-webkit-transform-origin: 0 0;}
.books img {margin: 160px 15px 0 15px;}
h1.intro {
font-size: 3.8rem;
margin: auto;
color: #E65F00;
}
.deprecated dt {
margin-bottom: 1rem;
}
dt {
font-weight: bold;
margin-top: 0.5rem;
background-color: #C5CCD4;
padding: 3px 5px;
display: inline-block;
margin-bottom: 2px;
clear: both;
}
.deprecated dd {
display: none;
font-weight: normal;
margin: 0 0 2px 0;
}
.deprecated dt:hover + dd {
display: inherit;
}
/* OBJECT PAGES */
.object header {
position:absolute;
top: 10px;
width: 100%;
text-align:center;
background-color: rgba(255,255,255,0.9);
left:0;
}
.objectlink {
position:absolute;
top:0; right:0;
color: white;
background-color: #000;
padding: 3px 5px;
border: none;
}
.slide.object {padding:0;}
.object object {width: 100%; height: 100%;}
.notes, .temphidden {display: none;}
.hidenotes {display: none;}
.visible .hidenotes {
display: inherit;
font-size: inherit;
background-color: #DEDEDE;
padding: 5px;
font-weight: normal;
list-style-type: none;
cursor: none
}
.visibility li {cursor: pointer;}
.half {opacity: .3;}
p.link {float: right; font-weight: bold;}
.columns ul,
.columns2 {
-webkit-columns: 2;
-moz-columns: 2;
columns: 2;
}
/* transition with and wirhtout reflow */
.fcode {
color: black;
font-size: 85%;
background-color: rgba(255,255,255,0.4);
-webkit-transition: all 2s ease-in 50ms;
-moz-transition: all 2s ease-in 50ms;
-ms-transition: all 2s ease-in 50ms;
-o-transition: all 2s ease-in 50ms;
transition: all 2s ease-in 50ms;
border:2px solid;
}
.fcode:hover {
color: red;
background-color: rgba(255,255,255,0.9);
}
.fcode:not(.fcode2):hover {
font-size: 120%;
}
.fcode2:hover {
-webkit-transform: scale(1.4);
-webkit-transform-origin: top left;
-moz-transform: scale(1.4);
-moz-transform-origin: top left;
-ms-transform: scale(1.4);
-ms-transform-origin: top left;
-o-transform: scale(1.4);
-o-transform-origin: top left;
transform: scale(1.4);
transform-origin: top left;
}
.credit {position:absolute; bottom: 10px; right: 10px; text-shadow: 0 0 4px rgba(255,255,255,0.5);}
.big, .big * {font-size: 1.6rem;}
.black {background-color: #000;}
.black h1 {color: #fff;}
.black p {color: #fff; font-size: 1.6rem; }
table {
margin: auto;
border: 1px solid #dedede;
border-collapse: collapse;
border-spacing:0;
}
section td, section th {
border: none;
font-size: 30px;
padding: 4px;
}
.th {
margin: 20px auto;
}
.rowed tr:nth-of-type(even),
.rowed th,
.th th {
background-color: #dedede;
}
.th th,
.th td {
padding: 10px;
border: 1px solid #bbb;
}
.th td {
text-align: center;
border: 1px solid #dedede;
border-collapse:collapse;
}
.htc {
color: #ffffff;
width: 320px;
background-color: #666;
}
.htc tbody {
max-height: 300px;
overflow:scroll;
}
.htc td, .htc th {
font-size: 14px;
padding: 2px 4px;
}
.htc thead {
background-image: -webkit-linear-gradient(top,
#333, #aaa, #333);
}
.htc tfoot tr td {color: #000;}
.htc tbody tr:nth-of-type(odd) {font-weight: bold;}
.htc tbody tr:nth-of-type(even) {color: #ccc;}
.htc tbody tr:nth-of-type(4n-3),
.htc tbody tr:nth-of-type(4n-2){
background-color: black;
}
.htc tbody tr:nth-of-type(even) td{
padding-bottom: 4px;
}
.htc tbody tr:nth-of-type(odd) td{
padding-top: 4px;
}
.onehundred{ padding: 10px; background-color: #dedede;}
.onehundred img { margin:5px;}
.onehundred span {
display:inline-block;
text-align:center;
font-size: 40px;
margin: 5px;
}
.whitened {
border-radius: 20px;
background-color:rgba(255,255,255,0.6);
text-shadow: 1px 1px #fff;
float: left;
padding: 10px;
}
#largegradient:hover {
background-image:url(images/hugegradient.jpg);
background-position: -125px -26px;
}
#fonts img {
display: block;
margin: 30px auto;
width: 700px;
}
#bcksizeexample2 {
float: right;
box-shadow: inset 5px 5px 5px rgba(0,0,0,0.4),inset -5px -5px 5px rgba(0,0,0,0.4) ;
width: 150px;
height:250px;
background-position: 50%;
background-image: url(http://placekitten.com/g/200/200/);
}
#four {cursor:move;}
@media print {
.slide {
page-break-inside: avoid;
page-break-after: always;
visibility: visible !important;
font-size: 20pt;
font-family: Arial, sans-serif;
}
@page {
size: landscape;
}
body {
font-size: 12pt;
background: white;
}
header h1 {
border-top: 2pt solid gray;
border-bottom: 1px dotted silver;
}
#presentation-counter, #info, #topinfo, .counter {
display: none
}
</style>
</head>
<body>
<header>
<nav>
<h1>Breaking the Mobile Web</h1>
<ul>
<li class="button cancel" id="back">Back</li>
<li class="button done" id="next">Next</li>
</ul>
</nav>
</header>
<!-- Top instructions -->
<div id="topinfo"></div>
<!-- footer instructions -->
<div id="info">
<p><a href="http://standardista.com">Estelle Weyl</a> | <a href="http://twitter.com/estellevw">@estellevw</a> | <a href="http://github.com/estelle">Github</a> | Press <span class="key">→</span> to advance, <span class="key">2</span> for comments, <span class="key" id="four">4</span> to read/write notes.</p>
</div>
<div id="presentation">
<div id="presentation-counter"></div>
<div id="slides">
<div class="slide">
<h1 class="intro">CSS3 + Mobile:<br> Web Performance</h1>
<div class="books">
<img src="http://akamaicovers.oreilly.com/images/9780980846904/cat.gif" alt="HTML5 and CSS3 for the Real World">
<img src="http://akamaicovers.oreilly.com/images/0636920018063/cat.gif" alt="HTML5: The Definitive Guide"/>
<img src="http://akamaicovers.oreilly.com/images/0636920021711/cat.gif" alt="MObile HTML5"/>
<img src="http://akamaicovers.oreilly.com/images/0636920025955/cat.gif" alt="Web Performance Daybook"/>
</div>
<br style="clear:both;">Slides: <a href="http://estelle.github.com/mobileperf">estelle.github.com/mobileperf</a>
<br/>Name: Estelle Weyl
<br>Blog: <a href="http://standardista.com">standardista.com</a>
<br>Twitter: <a href="http://twitter.com/estellevw">@estellevw</a></p>
</div>
<div class="slide normal">
<header><h1>How this slide deck works</h1></header>
<section class="content">
<p>Click on the #4 to show some notes stored with local storage</p>
<p>Press <span class="key">→</span> to advance and show next comments</p>
<p>Press <span class="key">←</span> to go back</p>
<p>Or navigation with buttons or browser history</p>
<p>Files will be at <a href="http://estelle.github.com/mobileperf">estelle.github.com/mobileperf</a></p>
<img src="images/top-smartphones.jpg" width="650" height="283" alt="phones" style="margin: 50px auto 0 auto; display:block;"> </section>
</div>
<!-- Table of Contents -->
<div class="slide normal" style="background-image:url(images/telephonecans.jpg); background-position:80% bottom; background-repeat:no-repeat;">
<header>
<h1>Device limitations!</h1>
</header>
<section>
<ul class="big">
<li>Battery</li>
<li>Latency</li>
<li>Memory</li>
<li>Responsiveness</li>
</ul>
<h2>Phones aren't Laptops</h2>
</section>
</div>
<!-- Fast -->
<div class="slide normal" style="background-image:url(images/fast.jpg); background-size:cover;">
<header>
<h1 style="color:#fff; font-size: 80px; -webkit-text-stroke: 1px yellow">Fast to ....
</h1>
</header>
<section style="height:550px">
<ul style="color:#fff; -webkit-transform:translateY(-10px); list-style-type: none; -webkit-text-stroke: 1px yellow">
<li style="font-size: 50px; font-weight: bold; -webkit-transform:translate(60px, 0px)">Load</li>
<li style="font-size: 50px; font-weight: bold; -webkit-transform:translate(450px, 10px)">Render</li>
<li style="font-size: 50px; font-weight: bold; -webkit-transform:translate(160px, 180px);">Respond</li>
<li style="font-size: 50px; font-weight: bold; -webkit-transform:translate(500px, 200px);">Understand</li>
</ul>
<ul style="color:#fff; margin-top: 150px;">
<li class="notes">Beautiful</li>
<li class="notes">Useful</li>
<li class="notes">Eco-friendly</li>
</ul>
<footer><a href="http://www.mypcwallpaper.com/wp-content/uploads/2011/02/running_cheetah_wallpaper1.jpg">mypcwallpaper.com</a></footer>
</section>
</div>
<!-- BATTERY -->
<div class="slide normal">
<header><h1>Batteries</h1>
</header>
<section style="background-image:url(images/carbattery.jpeg) , url(images/battery.jpg); background-position: bottom left, 80% 90%; background-size: auto, 130px;height:600px;">
</section>
</div>
<div class="slide object">
<object data="http://www2012.org/proceedings/proceedings/p41.pdf"></object>
<header><h1>Who Killed My Battery</h1></header>
<a href="http://www2012.org/proceedings/proceedings/p41.pdf" class="objectlink" target="_foo">Download PDF</a>
</div>
<div class="slide intro">
<header><h1 class="em" style="font-size: 7rem; margin:150px auto">TL;DR;</h1></header>
<section></section>
</div>
<div class="slide normal">
<section class="content">
<h2>Images</h2>
<ul>
<li>JPEGs perform better than GIFs and PNGs</li>
<li>Images use energy</li>
<li>Energy used to render images is proportional to quantity and size of images.</li>
</ul>
<h2>JavaScript</h2>
<ul>
<li>JS (and CSS) can be as expensive to render as images</li>
<li>Dynamic JS (like XMLHttpRequest) increases rendering cost (can't be cached). </li>
<li>JS (download, parsing & executing) can be the most energy consuming web page component
<ul class="temphidden" style="margin-top: 1em;">
<li>Webpages will load and parse all of your scripts, even if they are not used by the page</li>
<li>
Shrinking Javascript on mobile
sites to contain only functions used by the page greatly reduces
energy use.</li><li> Using Javascript libraries simplifies web
development, but increases the energy used by the resulting pages</li></ul></li></ul>
</section>
</div>
<!-- Battery consumption -->
<div class="slide normal" style="background-image:url(images/batteries.jpg); background-size: cover;">
<header>
<h1 style="color: #ffffff; font-size: 80px; -webkit-text-stroke: 1px #F00;">Battery Consumption</h1>
</header>
<section>
<div class="whitened big" style="float: none; background-color: rgba(255,255,255,0.8); padding:20px; margin-bottom: 40px; ">
<p>CPU Drains the battery. Avoid using it!</p>
<ul>
<li>Avoid Reflows (and repaints)</li>
<li>Minimize JavaScript (size and activity)</li>
<li>No JavaScript Animations</li>
<li>Avoid WebGL</li>
<li>Implement what you learn today</li>
<li>Avoid loading resources you don't need</li>
<li>Manage memory</li>
</ul>
</div>
<footer class="credit">Image Credit: <a href="http://naiksaneet.wordpress.com">naiksaneet.wordpress.com</a></footer>
</section>
</div>
<!-- TERM: Latency -->
<div class="slide intro" style="background:url(images/latencykills.jpg) bottom center no-repeat #ffffff;">
<header>
<h1>Latency</h1>
</header>
<section>
<footer class="credit">Photo: <a href="http://www.flickr.com/photos/tby/1472668838/">T Bryce Yehl</a></footer>
</section>
</div>
<!--YSLOW -->
<div class="slide normal">
<header>
<h1>YSLOW<img src="images/yslow.png" alt="" style="vertical-align:middle; margin-left: 20px;"></h1>
</header>
<section>
<ul class="visibility">
<li>Make fewer HTTP requests
<p class="hidenotes">Decreasing the number of components on a page reduces the number of HTTP requests required to render the page, resulting in faster page loads. Some ways to reduce the number of components include: combine files, combine multiple scripts into one script, combine multiple CSS files into one style sheet, and use CSS Sprites and image maps.</p>
</li>
<li>Avoid empty src or href
<p class="hidenotes">You may expect a browser to do nothing when it encounters an empty image src. However, it is not the case in most browsers. IE makes a request to the directory in which the page is located; Safari, Chrome, Firefox 3 and earlier make a request to the actual page itself. This behavior could possibly corrupt user data, waste server computing cycles generating a page that will never be viewed, and in the worst case, cripple your servers by sending a large amount of unexpected traffic.</p>
</li>
<li>Compress components with gzip
<p class="hidenotes">Compression reduces response times by reducing the size of the HTTP response. Gzip is the most popular and effective compression method currently available and generally reduces the response size by about 70%. Approximately 90% of today's Internet traffic travels through browsers that claim to support gzip.</p></li>
<li>Put CSS at top
<p class="hidenotes">Moving style sheets to the document HEAD element helps pages appear to load quicker since this allows pages to render progressively.</p>
</li>
<li>Put JavaScript at bottom
<p class="hidenotes">JavaScript scripts block parallel downloads; that is, when a script is downloading, the browser will not start any other downloads. To help the page load faster, move scripts to the bottom of the page if they are deferrable.</p>
</li>
<li>Avoid CSS expressions
<p class="hidenotes">CSS expressions (supported in IE beginning with Version 5) are a powerful, and dangerous, way to dynamically set CSS properties. These expressions are evaluated frequently: when the page is rendered and resized, when the page is scrolled, and even when the user moves the mouse over the page. These frequent evaluations degrade the user experience.
</p>
</li>
<li>Reduce DNS lookups
<p class="hidenotes">The Domain Name System (DNS) maps hostnames to IP addresses, just like phonebooks map people's names to their phone numbers. When you type URL www.yahoo.com into the browser, the browser contacts a DNS resolver that returns the server's IP address. DNS has a cost; typically it takes 20 to 120 milliseconds for it to look up the IP address for a hostname. The browser cannot download anything from the host until the lookup completes.
</p>
</li>
<li>Minify JavaScript and CSS
<p class="hidenotes">
Minification removes unnecessary characters from a file to reduce its size, thereby improving load times. When a file is minified, comments and unneeded white space characters (space, newline, and tab) are removed. This improves response time since the size of the download files is reduced.
</p>
</li>
<li>Avoid URL redirects
<p class="hidenotes">
URL redirects are made using HTTP status codes 301 and 302. They tell the browser to go to another location. Inserting a redirect between the user and the final HTML document delays everything on the page since nothing on the page can be rendered and no components can be downloaded until the HTML document arrives.
</p></li>
<li>Remove duplicate JavaScript and CSS
<p class="hidenotes">
Duplicate JavaScript and CSS files hurt performance by creating unnecessary HTTP requests (IE only) and wasted JavaScript execution (IE and Firefox). In IE, if an external script is included twice and is not cacheable, it generates two HTTP requests during page loading. Even if the script is cacheable, extra HTTP requests occur when the user reloads the page. In both IE and Firefox, duplicate JavaScript scripts cause wasted time evaluating the same scripts more than once. This redundant script execution happens regardless of whether the script is cacheable.
</p></li>
<li> Reduce the number of DOM elements
<p class="hidenotes">
A complex page means more bytes to download, and it also means slower DOM access in JavaScript. Reduce the number of DOM elements on the page to improve performance.</p>
</li>
<li>Avoid HTTP 404 (Not Found) error
<p class="hidenotes">Making an HTTP request and receiving a 404 (Not Found) error is expensive and degrades the user experience. Some sites have helpful 404 messages (for example, "Did you mean ...?"), which may assist the user, but server resources are still wasted.</p></li>
<li> Avoid AlphaImageLoader filter
<p class="hidenotes">The IE-proprietary AlphaImageLoader filter attempts to fix a problem with semi-transparent true color PNG files in IE versions less than Version 7. However, this filter blocks rendering and freezes the browser while the image is being downloaded. Additionally, it increases memory consumption. The problem is further multiplied because it is applied per element, not per image.
</p>
</li>
<li>Do not scale images in HTML
<p class="hidenotes">Web page designers sometimes set image dimensions by using the width and height attributes of the HTML image element. Avoid doing this since it can result in images being larger than needed. For example, if your page requires image myimg.jpg which has dimensions 240x720 but displays it with dimensions 120x360 using the width and height attributes, then the browser will download an image that is larger than necessary.</p></li>
<li>Make favicon small and cacheable
<p class="hidenotes">A favicon is an icon associated with a web page; this icon resides in the favicon.ico file in the server's root. Since the browser requests this file, it needs to be present; if it is missing, the browser returns a 404 error (see "Avoid HTTP 404 (Not Found) error" above). Since favicon.ico resides in the server's root, each time the browser requests this file, the cookies for the server's root are sent. Making the favicon small and reducing the cookie size for the server's root cookies improves performance for retrieving the favicon. Making favicon.ico cacheable avoids frequent requests for it.
</p>
</li>
</ul>
<footer>
<p class="link">Download and install <a href="http://developer.yahoo.com/yslow/">YSlow</a></p>
<p class="half">Click list item for details.</p>
</footer>
</section>
</div>
<!-- Page Speed -->
<div class="slide normal">
<header>
<h1>Page Speed <img src="images/pagespeed.png" alt="" style="vertical-align:middle; margin: 0 0 0 20px" ></h1>
</header>
<section class="content columns">
<ul class="columns2">
<li>Leverage browser caching</li>
<li>Enable compression</li>
<li>Defer parsing of JavaScript</li>
<li>Minimize request size</li>
<li>Specify a cache validator</li>
<li>Optimize images</li>
<li>Minify JavaScript</li>
<li>Minify HTML</li>
<li>Specify image dimensions</li>
<li>Specify a character set</li>
<li>Specify a Vary: Accept-Encoding header</li>
<li>Reduce request serialization</li>
<li>Eliminate unnecessary reflows</li>
<li>Avoid long-running scripts</li>
<li>Avoid CSS @import</li>
<li>Avoid bad requests</li>
<li>Enable Keep-Alive</li>
<li>Make landing page redirects cacheable</li>
<li>Minify CSS</li>
<li>Minimize redirects</li>
<li>Optimize the order of styles and scripts</li>
<li>Put CSS in the document head</li>
<li>Remove query strings from static resources</li>
<li>Serve resources from a consistent URL</li>
<li>Serve scaled images</li>
</ul>
<footer><a href="http://code.google.com/speed/page-speed/">Google Page Speed Tools</a></footer>
</section>
</div>
<div class="slide normal">
<header><h1>What that means....</h1></header>
<section class="content">
<pre contenteditable style="font-size: 1.4rem;"><!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Titles are good for SEO</title>
<link rel="stylesheet" href="prettyWhenItLoads.<strong>css</strong>"/>
</head>
<body>
<!-- lots of good content -->
<script src="dontBlockHTMLandCSS.<strong>js</strong>"></script>
</body>
</html></pre>
</section>
</div>
<!-- Normal DNS -->
<div class="slide normal">
<header>
<h1>DNS / HTTP Requests </h1>
</header>
<section>
<img src="images/simpledns.gif" style="margin: 40px auto; display: block" alt="COmputer asks DNS server for IP address, then goes to IP to get website" />
<p style="text-align:center; position:absolute; bottom: 40px; width: 100%;">Each host is a different lookup!!</p>
</section>
</div>
<!-- Mobile DNS -->
<div class="slide normal">
<header>
<h1>Latency</h1>
</header>
<section>
<img src="images/latency.gif" style="margin: 40px auto" alt="Computer asks DNS server for IP address, then goes to IP to get website" />
</section>
</div>
<!-- STEVE SOUDERS
<div class="slide object">
<object data="http://stevesouders.com/mobileperf/"></object>
<header><h1>Mobile Performance Bookmarklet</h1></header>
<a href="http://stevesouders.com/mobileperf/mobileperfbkm.php" class="objectlink">SteveSounders</a>
</div>
-->
<div class="slide">
<header>
<h1>Weinre</h1>
</header>
<section>
<ol>
<li>Download & Install <a href="http://nodejs.org">Node.js</a> (includes NPM)</li>
<li>Install Weinre
<pre contenteditable>npm -g install weinre</pre>
</li>
<li>Start Weinre
<pre contenteditable>weinre</pre>
</li>
<li>Add Weinre to web page
<pre contenteditable><script src="http://localhost:8080/target/target-script-min.js#anonymous"></script></pre>
</li>
<li>Open the inspector
<pre contenteditable>http://localhost:8080/client/</pre>
</li>
</ol>
</section>
</div>