Transcript
Page 1: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Max Firtman @firt

BREAKING LIMITS

ON MOBILE

HTML5

Amsterdam, May 16th, 2013

Thursday, May 16, 13

Page 2: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

mobile+web developer

maximiliano @firt

Thursday, May 16, 13

Page 3: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 4: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 5: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hacks, why?

Thursday, May 16, 13

Page 6: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 7: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 8: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 9: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 10: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 11: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

1- UI hacks

Thursday, May 16, 13

Page 12: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

UI

Full screen

Thursday, May 16, 13

Page 13: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

Thursday, May 16, 13

Page 14: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

4 solutionsThursday, May 16, 13

Page 15: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

Solution #1

Thursday, May 16, 13

Page 16: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

<meta name="apple-mobile-web-app-capable" content="yes">

Thursday, May 16, 13

Page 17: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

<meta name="apple-mobile-web-app-capable" content="yes">

if (navigator.standalone) { }

Thursday, May 16, 13

Page 18: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

<meta name="apple-mobile-web-app-capable" content="yes">

<meta name="viewport" content="width=device-width">

Thursday, May 16, 13

Page 19: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 20: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 21: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

<meta name="apple-mobile-web-app-capable" content="yes"><meta name="viewport" content="width=320.1">

Thursday, May 16, 13

Page 22: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

<meta name="apple-mobile-web-app-capable" content="yes">

<meta name="viewport" content="width=device-width"><meta name="viewport" content="..." media="device-height: 568px">

Thursday, May 16, 13

Page 23: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

Thursday, May 16, 13

Page 24: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

Solution #2

Thursday, May 16, 13

Page 25: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

Thursday, May 16, 13

Page 26: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

@media (orientation: landscape) and (height: 214px), (orientation: landscape) and (height: 181px) {}

Thursday, May 16, 13

Page 27: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

Solution #3

future platforms

Thursday, May 16, 13

Page 28: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screenvar body = document.documentElement;

if (body.requestFullScreen) { body.requestFullScreen();}

Thursday, May 16, 13

Page 29: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screenvar body = document.documentElement;

if (body.requestFullScreen) { body.requestFullScreen();} else if (body.webkitRequestFullScreen) { body.webkitRequestFullScreen();}

Thursday, May 16, 13

Page 30: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screenvar body = document.documentElement;

if (body.requestFullScreen) { body.requestFullScreen();} else if (body.webkitRequestFullScreen) { body.webkitRequestFullScreen();} else if (body.mozRequestFullScreen) { body.mozRequestFullScreen();}

Thursday, May 16, 13

Page 31: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

Solution #4

...

Thursday, May 16, 13

Page 32: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

full screen

window.addEventListener("load", function() { window.scrollTo(0, 0); });

// use with caredocument.addEventListener("touchmove", function(e) { e.preventDefault() });

Thursday, May 16, 13

Page 33: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

UI

Snapped mode Windows 8

Thursday, May 16, 13

Page 34: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

snapped mode

Thursday, May 16, 13

Page 35: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

snapped mode

@media only screen and (max-width: 400px) { @-ms-viewport {  width: 320px;  }}

Thursday, May 16, 13

Page 36: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

UI

High resolutioncanvas

Thursday, May 16, 13

Page 37: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hi-res canvas

<canvas width="300" height="200"></canvas>

300px

Thursday, May 16, 13

Page 38: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hi-res canvas

300 CSS pixels

300 1.00390 1.30450 1.50600 2.00672 2.24900 3.00

device px px ratio

Thursday, May 16, 13

Page 39: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hi res canvas

<canvas width="300" height="200"> </canvas>

300px

Thursday, May 16, 13

Page 40: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hi res canvas

var devPxRatio = window.devicePixelRatio;

var canvasPxRatio = document.querySelector("canvas") .getContext("2d") .webkitBackingStorePixelRatio;

Thursday, May 16, 13

Page 41: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hi res canvas

<canvas width="300" height="200"> </canvas>

300px

devPxRatio = 2canvasPxRatio = 1

Thursday, May 16, 13

Page 42: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hi res canvas

<canvas width="300" height="200"> </canvas>

300px

devPxRatio >= 1canvasPxRatio = undefined

Thursday, May 16, 13

Page 43: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution #1

hi res canvas

Thursday, May 16, 13

Page 44: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hi res canvas

<meta name="viewport" content="width=640">

<canvas width="600" height="400"></canvas>

600px

Thursday, May 16, 13

Page 45: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution #2

hi res canvas

Thursday, May 16, 13

Page 46: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hi res canvas

<script>document.querySelector("canvas") .getContext("2d") .setScale(2, 2);</script>

300px

Thursday, May 16, 13

Page 47: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hi res canvas

<canvas width="600" height="400"></canvas>

300px

<script>document.querySelector("canvas") .getContext("2d") .setScale(2, 2);</script>

Thursday, May 16, 13

Page 48: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

hi res canvas

<canvas width="600" height="400" style="width: 300px; height: 200px"></canvas>

300px

<script>document.querySelector("canvas") .getContext("2d") .setScale(2, 2);</script>

Thursday, May 16, 13

Page 49: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

multi-platform &multi-resolution

Thursday, May 16, 13

Page 50: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

execution &memory

Thursday, May 16, 13

Page 51: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

UI

truly numeric !eld

Thursday, May 16, 13

Page 52: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

numeric

<input type="number">

Thursday, May 16, 13

Page 53: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

numeric

<input type="number">

Thursday, May 16, 13

Page 54: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

numeric

<input type="number">

Thursday, May 16, 13

Page 55: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution

Thursday, May 16, 13

Page 56: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

numeric

<input type="number" pattern="[0-9]*">

Thursday, May 16, 13

Page 57: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

numeric

<input type="password" pattern="[0-9]*">

Thursday, May 16, 13

Page 58: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

UI

rich editor

Thursday, May 16, 13

Page 59: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

rich editor

<ul contenteditable> <li>First item</ul>

Thursday, May 16, 13

Page 60: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

rich editor

<ul contenteditable> <li>First item</ul>

Thursday, May 16, 13

Page 61: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

rich editor

<ul contenteditable> <li>First item</ul>

Thursday, May 16, 13

Page 62: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

UI

background tabresurrection

Thursday, May 16, 13

Page 63: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

background

Thursday, May 16, 13

Page 64: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

background

Thursday, May 16, 13

Page 65: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 66: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

<blink>Welcome to my website!</blink>

Thursday, May 16, 13

Page 67: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

<bgsound src="welcome.wav">

Thursday, May 16, 13

Page 68: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

<font family="Arial" size="20">

Thursday, May 16, 13

Page 69: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

background

<meta http-equiv="refresh" content="60">

Thursday, May 16, 13

Page 70: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

background<meta http-equiv="refresh" content="2">

Thursday, May 16, 13

Page 71: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

background<meta http-equiv="refresh" content="2">

<script>var mr = document.querySelector("meta");setInterval(function() { mr.content=mr.content; }, 1000); </script>

Thursday, May 16, 13

Page 72: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 73: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

background

Thursday, May 16, 13

Page 74: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

DISCLAIMER

Thursday, May 16, 13

Page 75: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

only from iOS 6.1(5.0+ similar)

Thursday, May 16, 13

Page 76: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

UI

images for different screen densities

Thursday, May 16, 13

Page 77: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

<img src="photo.png" width="300">

Thursday, May 16, 13

Page 78: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

Thursday, May 16, 13

Page 79: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

300 CSS pixels

300 1.00390 1.30450 1.50600 2.00672 2.24900 3.00

device px px ratio

screen densities

Thursday, May 16, 13

Page 80: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution #1

Thursday, May 16, 13

Page 81: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

use vector images <img src="photo.svg" width="300">

<svg></svg>

@font-face {}

Thursday, May 16, 13

Page 82: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

Thursday, May 16, 13

Page 83: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

Thursday, May 16, 13

Page 84: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution #2

Thursday, May 16, 13

Page 85: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

<img src="photo.png" width="300">

if (window.devicePixelRatio > 1.5) { // change URL}

Thursday, May 16, 13

Page 86: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution #3

Thursday, May 16, 13

Page 87: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

<div id="photoContainer">

#photoContainer { background-image: -webkit-image-set(url('photo-lo.png') 1x, url('photo-hi.png') 2x); width: 300px; height: 200px;}

Thursday, May 16, 13

Page 88: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution #4

Thursday, May 16, 13

Page 89: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

<div id="photoContainer">

#photoContainer { background-image: url('photo-lo.png'); width: 300px; height: 200px;}

Thursday, May 16, 13

Page 90: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

<div id="photoContainer">

@media (-webkit-min-device-pixel-ratio: 1.5) {#photoContainer { background-image: url('photo-hi.png'); background-size: 100%; width: 300px; height: 200px;}

}

Thursday, May 16, 13

Page 91: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

<div id="photoContainer">

@media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5) {

}

Thursday, May 16, 13

Page 92: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

<div id="photoContainer">

@media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 1/2) {

}

Thursday, May 16, 13

Page 93: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

screen densities

<div id="photoContainer">

@media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 1/2), (min-resolution: 1.5dppx) {

}

Thursday, May 16, 13

Page 94: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

always query on ranges

@media (-webkit-device-pixel-ratio: 2)

Thursday, May 16, 13

Page 95: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

always query on ranges

@media (-webkit-min-device-pixel-ratio: 1.7)

Thursday, May 16, 13

Page 96: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

!nd the balance300x300 900x900

Thursday, May 16, 13

Page 97: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

2- device interaction hacks

Thursday, May 16, 13

Page 98: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

device

media capture

Thursday, May 16, 13

Page 99: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

media capture

<input type="file">

Thursday, May 16, 13

Page 100: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution

Thursday, May 16, 13

Page 101: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

media capture

<input type="file" accept="image/*">

<input type="file" accept="video/*">

<input type="file" accept="audio/*">

Thursday, May 16, 13

Page 102: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

media capture

<input type="file" accept="image/*" capture="camera">

<input type="file" accept="video/*" capture="camcorder">

<input type="file" accept="video/*" capture="microphone">

(old spec)Thursday, May 16, 13

Page 103: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

media capture

Live demo

Thursday, May 16, 13

Page 104: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

device

interacting with native apps

Thursday, May 16, 13

Page 105: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

Thursday, May 16, 13

Page 106: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 107: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution, part I

Thursday, May 16, 13

Page 108: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

DON'T DO THAT

Thursday, May 16, 13

Page 109: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution, part II

Thursday, May 16, 13

Page 110: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

<meta name="apple-itunes-app" content="app-id=999">

Thursday, May 16, 13

Page 111: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

Thursday, May 16, 13

Page 112: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

<meta name="apple-itunes-app" content="app-id=999">

<meta name="app-argument" content="">

Thursday, May 16, 13

Page 113: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

<meta name="msApplication-ID" content="App"><meta name="msApplication-PackageFamilyName" content="myPackage">

Thursday, May 16, 13

Page 114: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

Thursday, May 16, 13

Page 115: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

Thursday, May 16, 13

Page 116: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

Thursday, May 16, 13

Page 117: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

<meta name="msApplication-ID" content="App"><meta name="msApplication-PackageFamilyName" content="myPackage">

<meta name="msApplication-Arguments" content="">

Thursday, May 16, 13

Page 118: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

no apino android

Thursday, May 16, 13

Page 119: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Solution, part III

Thursday, May 16, 13

Page 120: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

<a href="customprotocol://">Open app</a>

Thursday, May 16, 13

Page 121: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

<a href="twitter://post?message=HTML5">Tweet this</a>

Thursday, May 16, 13

Page 122: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

Thursday, May 16, 13

Page 123: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

function tweet() { location.href="twitter://post?message=HTML5"; setTimeout(function() {

location.href="postCall.html"; }, 1000);}

Thursday, May 16, 13

Page 124: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integration

Thursday, May 16, 13

Page 125: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

native integrationfunction tweet() { iframe.location.href= "twitter://post?message=HTML5"; setTimeout(function() {

appNotInstalled(); }, 1000);}

Thursday, May 16, 13

Page 126: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

device

push noti!cation

Thursday, May 16, 13

Page 127: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

push

<a href="suscription.passbook"> Subscribe to this site</a>

Thursday, May 16, 13

Page 128: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

push

Thursday, May 16, 13

Page 129: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

push

Thursday, May 16, 13

Page 130: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

3- enhancing your app hacks

Thursday, May 16, 13

Page 131: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

enhance your app

iOS home screen title

Thursday, May 16, 13

Page 132: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

home screen

Thursday, May 16, 13

Page 133: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

home screen

Thursday, May 16, 13

Page 134: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

home screen

<title>My long title for SEO</title><meta name="apple-web-app-title" content="My App">

UNDOCUMENTED

Thursday, May 16, 13

Page 135: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

enhance your app

IE10 Live Tile

Thursday, May 16, 13

Page 136: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

live tile

Thursday, May 16, 13

Page 137: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

live tile

Thursday, May 16, 13

Page 138: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

live tile

<meta name="msapplication-TileImage" content="tile.png">

<meta name="msapplication-TileColor" content="#ef0303">

Thursday, May 16, 13

Page 139: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

enhance your app

You've said live tile!!!

Thursday, May 16, 13

Page 140: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

live tile

<meta name="msapplication-badge" content="frequency=60;polling-uri=XXX">

Thursday, May 16, 13

Page 141: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

live tile<meta name="msapplication-badge" content="frequency=60;polling-uri=XXX">

<?xml version="1.0" ?><badge value="3" />

Thursday, May 16, 13

Page 142: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

live tile<meta name="msapplication-badge" content="frequency=60;polling-uri=XXX">

<?xml version="1.0" ?><badge value="newMessage" />

Thursday, May 16, 13

Page 143: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

enhance your app

Storage limits

Thursday, May 16, 13

Page 144: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

storage

AppCache, localStorage, WebSQL, IDB

Thursday, May 16, 13

Page 145: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

storage

Different domains, iframes and Cross Document Messaging API

Thursday, May 16, 13

Page 146: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

storage

Thursday, May 16, 13

Page 147: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

this might not work in the future

Thursday, May 16, 13

Page 148: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

do you really need more space?

Thursday, May 16, 13

Page 149: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

4- tools

Thursday, May 16, 13

Page 150: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Tools

Bandwidth simulators

Thursday, May 16, 13

Page 151: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

netlimiter.com

Thursday, May 16, 13

Page 152: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

slowyapp.com

Thursday, May 16, 13

Page 153: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

charlesproxy.com

Thursday, May 16, 13

Page 154: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Tools

Virtual Mobile Labs

Thursday, May 16, 13

Page 155: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

developer.nokia.comThursday, May 16, 13

Page 156: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

developer.samsung.comThursday, May 16, 13

Page 157: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

keynotedeviceanywhere.com

Thursday, May 16, 13

Page 158: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

most used key combinations?

Thursday, May 16, 13

Page 159: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 160: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 161: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Tools

Live Reload

Thursday, May 16, 13

Page 162: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

livereload.com

Thursday, May 16, 13

Page 163: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

wrapping up

Thursday, May 16, 13

Page 164: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

we need hacks because

• browsers are different• no enough information• undocumented features• buggy

Thursday, May 16, 13

Page 165: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

however

• usability and Performance matters• be careful• your app should work anyway • use feature detection

Thursday, May 16, 13

Page 166: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

1 fullscreen2 snapped mode3 hires canvas4 numeric !eld5 rich editor6 background tab7 images & densities8 html media capture

9 push noti!cationA home screen titleB live tileC storage limitsD bandwidth simulatorsE virtual mobile labsF live reload

Thursday, May 16, 13

Page 167: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

Thursday, May 16, 13

Page 168: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

“change is the only constant“Heraclitus

Thursday, May 16, 13

Page 169: Breaking Limits on Mobile HTML5 - 15 Hacks you might not know

you can reach a good experience

Pictures)from)freedigitalphotos.net)

thank you!

[email protected] @!rt

!rt.mobi/pmw

Thursday, May 16, 13