SlideShare a Scribd company logo
JavaScript
      on
Mobile Devices
     Jens Arps
       uxebu
Js On Mobile Devices
We open the mobile web.
http://www.flickr.com/photos/63629542@N00/435549194/




       JS on the desktop
http://www.flickr.com/photos/phily/263037865/




       JS on mobile?
Mobile Devices


• Smartphones
Mobile Devices


• Smartphones
• Featurephones
Mobile Devices

• Smartphones
• Featurephones
• Non phone handhelds
Mobile Devices

• Smartphones
• Featurephones
• Non phone handhelds
• TVs
Mobile Devices

• Smartphones
• Featurephones
• Non phone handhelds
• TVs
• Gaming Consoles
Mobile
Embedded Devices
• Smartphones
• Featurephones
• Non phone handhelds
• TVs
• Gaming Consoles
Browser Landscape

• WebKit
• Opera Mini / Mobile
• NetFront, Blackberry, IE Mobile
•…
Browser Landscape

                 WebKit rules!

For compatability charts, see @ppk‘s quirksmode:
     http://quirksmode.org/m/w3c_core.html
Browser Landscape

               Good news:
      1) iOS and Android devices use WebKits
      2) Most mobile WebKits are pretty good
3) 8 of the top 10 smartphones are iOS or Android
Performance
Performance
Again: My phone reads 1,000 entries from
         localStorage in 16.4ms.
Performance differs!
  Some DOM modifcation test‘s results:

      HTC Desire        0.8s
      Samsung Wave      2.1s
      iPhone 3.1       11.1s
      iPhone 2.2       14.3s
      IE Mobile 6       died
Performance differs!
  Some DOM modifcation test‘s results:

      HTC Desire        0.8s


         TES T!
      Samsung Wave
      iPhone 3.1
                        2.1s
                       11.1s
      iPhone 2.2       14.3s
      IE Mobile 6       died
WebApps
  (Yeah!)
WebApps? native?
Tools like Phonegap or Titanium can turn your
            WebApps to native apps.
iOS meta tags
http://developer.apple.com/safari/library/documentation/appleapplications/reference/safarihtmlref/articles/metatags.html




      - apple-mobile-web-app-capable
      - apple-mobile-web-app-status-bar-style
      - viewport
Pitfalls
  typeof(webkit) == “webkit“ // false


• 10+ WebKits out there
• iPhone‘s WebKit is great, Android
  1.5‘s is not

• JS is pretty similar, except for new
  features (localStorage, e.g.)

     (check: http://quirksmode.org/webkit.html)
Pitfalls
                caching is limited



• iOS 3.2 does not cache components
  larger than 25.6kb

• gzip does not count

   http://www.yuiblog.com/blog/2010/06/28/mobile-browser-cache-limits/
Pitfalls
        Android is not iOS!

• Android has keyboard navigation
• Only <a> elements receive focus
  using keys

• Android knows hover states
• Android doesn‘t trigger
  onorientationchange
Pitfalls
      click event != touch event


• click events are fired
• iPhone fires single click event
  300ms after the touch event

• learn and use touch events, they are
  powerful
Summary
All‘s good, really. Code on.
Thanks.

http://uxebu.com

     Jens Arps, uxebu

     arps@uxebu.com
 http://twitter.com/uxebu
http://twitter.com/jensarps
     http://jensarps.de

More Related Content

KEY
エキサイトでのアプリケーション開発体制
PDF
android開発者が見たiOS
PDF
Movable Type Smartphone Option
PDF
abc2011w-deb
PPTX
I Like iPhone & Android But I am .NET Developer
PPTX
I os class 1 of 3 actual
PPTX
iPhone for REALTORS
PPT
Making The Most Of Mobile
エキサイトでのアプリケーション開発体制
android開発者が見たiOS
Movable Type Smartphone Option
abc2011w-deb
I Like iPhone & Android But I am .NET Developer
I os class 1 of 3 actual
iPhone for REALTORS
Making The Most Of Mobile

What's hot (20)

PPT
iPad Workshop
PPT
I pad class 3 maple grove
PPTX
I phone 5s
PPTX
I phone 5s
PDF
Android Wear Applications in C# with Xamarin
PPTX
Developing for Wearables with Xamarin
PDF
Aleksandar Vacić - iOS App Development iz Srbije
PDF
Native vs. Web App
PPTX
From desktop to mobile web
PPTX
Mobile Life - Windows Mobile
PPTX
WebMatrix jQuery Mobile Web
PDF
I Phone Developer Introduction By Eschipul
PDF
如何變成iOS App開發魔法師
PPTX
10 things to make you a Great Mobile Web Developer
PDF
Maximising the opportunities of the online marketplace (South Australia)
PDF
Apps fpr Real Estate Agents Reinsw
KEY
a-blog cms 勉強会 NAGOYA 20110718
DOCX
ใบงานท 1 แบบสำรวจและประวัติส่วนตัว
PDF
Building Native Apps With Titanium Mobile
PDF
5 Tips About How to fix slow iPhone
iPad Workshop
I pad class 3 maple grove
I phone 5s
I phone 5s
Android Wear Applications in C# with Xamarin
Developing for Wearables with Xamarin
Aleksandar Vacić - iOS App Development iz Srbije
Native vs. Web App
From desktop to mobile web
Mobile Life - Windows Mobile
WebMatrix jQuery Mobile Web
I Phone Developer Introduction By Eschipul
如何變成iOS App開發魔法師
10 things to make you a Great Mobile Web Developer
Maximising the opportunities of the online marketplace (South Australia)
Apps fpr Real Estate Agents Reinsw
a-blog cms 勉強会 NAGOYA 20110718
ใบงานท 1 แบบสำรวจและประวัติส่วนตัว
Building Native Apps With Titanium Mobile
5 Tips About How to fix slow iPhone
Ad

Viewers also liked (6)

PPT
Categorías gramaticales grupo iii
PPT
Trends in Agile Testing by Lisa Crispin
PDF
Testing Techniques For Agile Testers - Janet Gregory
PPTX
Distributed ScrumMasters and the art of digital facilitation
PPTX
Comparison of different Agile Iterative process approaches
PDF
A Testers Role On Agile Projects - Janet Gregory
Categorías gramaticales grupo iii
Trends in Agile Testing by Lisa Crispin
Testing Techniques For Agile Testers - Janet Gregory
Distributed ScrumMasters and the art of digital facilitation
Comparison of different Agile Iterative process approaches
A Testers Role On Agile Projects - Janet Gregory
Ad

Similar to Js On Mobile Devices (20)

KEY
Developing for Mobility
PPTX
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
PDF
Best practices for delivering quality web experiences
KEY
HTML5 and the Mobile Web
PDF
Mobile App Development
PDF
Why HTML5 is getting on my nerves…
KEY
Mobile html5 v2
KEY
Mobile JavaScript
KEY
Phonegap for Engineers
PDF
DDive- Giuseppe Grasso - mobile su Lotus
PPTX
I like i phone and android but know .net
PDF
The challenges of building mobile HTML5 applications - FEEC Brazil 2012 - Recife
KEY
HTML5 로 iPhone App 만들기
PDF
Smau milano 2012 arena social media emanuele-bolognesi
PPT
Doran-C4L2010
PDF
移动端Web app开发
PDF
Mobile Web Performance - Getting and Staying Fast
PDF
Web Apps and Responsive Design for Libraries
KEY
Falsy Values - Warsaw 2011
PDF
Mobile is slow - Over the Air 2013
Developing for Mobility
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
Best practices for delivering quality web experiences
HTML5 and the Mobile Web
Mobile App Development
Why HTML5 is getting on my nerves…
Mobile html5 v2
Mobile JavaScript
Phonegap for Engineers
DDive- Giuseppe Grasso - mobile su Lotus
I like i phone and android but know .net
The challenges of building mobile HTML5 applications - FEEC Brazil 2012 - Recife
HTML5 로 iPhone App 만들기
Smau milano 2012 arena social media emanuele-bolognesi
Doran-C4L2010
移动端Web app开发
Mobile Web Performance - Getting and Staying Fast
Web Apps and Responsive Design for Libraries
Falsy Values - Warsaw 2011
Mobile is slow - Over the Air 2013

Recently uploaded (20)

PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Mushroom cultivation and it's methods.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
August Patch Tuesday
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
1. Introduction to Computer Programming.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Machine Learning_overview_presentation.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
TLE Review Electricity (Electricity).pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
MIND Revenue Release Quarter 2 2025 Press Release
Mushroom cultivation and it's methods.pdf
Programs and apps: productivity, graphics, security and other tools
Assigned Numbers - 2025 - Bluetooth® Document
A comparative analysis of optical character recognition models for extracting...
Advanced methodologies resolving dimensionality complications for autism neur...
Network Security Unit 5.pdf for BCA BBA.
Digital-Transformation-Roadmap-for-Companies.pptx
Empathic Computing: Creating Shared Understanding
August Patch Tuesday
OMC Textile Division Presentation 2021.pptx
1. Introduction to Computer Programming.pptx
Getting Started with Data Integration: FME Form 101
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Machine Learning_overview_presentation.pptx

Js On Mobile Devices

Editor's Notes

  • #4: * Js on desktop is all the juicy power * webGL, canvas-video, JS flash container * big question is: -&gt;
  • #5: is that js on mobile devices?? lets find it out! -&gt; first, we need to define what mobile devices are:
  • #6: iphone, ipad, android phones
  • #7: phones that make it into the net somehow, like my old nokia
  • #8: the ogo, or the psp -&gt; but, there are also:
  • #9: yes, TV widgets! widget-capable tvs are already sold right now.
  • #10: Wii, PS3 all have internet browsers
  • #11: * so we need to speak of embedded devices instead (car dashboard) * but, we will focus on smartphones today -&gt; some good fragmentation! and the browsers?
  • #12: we have webkit (yeah!), the opera browsers, and many, many more... there is also fennec, but its not really there yet...
  • #13: * webkit and opera do fine* webkit rules - but thats noth the whole truth about webkit, more later... * that table is more than a year old - but still ok to check. -&gt; ow its time for some:
  • #14: * to 3) May 2010, numbers by admob
  • #15: * My phone reads 1,000 entries from localStorage in 16.4ms.
  • #16: * (Chrome: 240ms, Firefox: 77ms, Safari: 1.4ms) * anyway, thats wicked fast (it&amp;#x2018;s a phone)! -&gt; but, the main thing is:
  • #17: On modern phones, perf is pretty good, but don&amp;#x2018;t go too far, and:
  • #18: test your code on as many devices as possible! -&gt; but, what you will want to do, is:
  • #19: * or, mobile-capable websites (still yeah!) * webapps and websites are the same (for me and for now, at least). * what applies to webapps, also applies to websites -&gt; to turn an a webapp into a native app :
  • #20: * so they can be ditsributed to appStores * but, no need, iTunes also holds webApps * or, on iOS, you can use -&gt;
  • #21: * the first leads to the navigator.standalone property * home-button -&gt; website w/out chrome * device-width!! -&gt; now back to js, and to some pitfalls
  • #22: * most differences in JS are founded in different ages of the browsers * iOS 2.x is dead, but Android 1.5/1.6 is not
  • #23: * iOS 4 does more, but only 50k * iOS 3.2 is shipped w/ iPad * dont just throw a super-sized JS-Framework into a phone!! * thanks to Ryan Grove from YUIBlog
  • #24: * a div with onclick/ontouch event connection will not work using keyboards! * i know more than one app ported from iphone to android that simply dont work.
  • #25: * dont just port JS code to a multitouch device, think about it! * click events are fired, but behave different (no dblclick, e.g.) * touch events are cool, check them out
  • #26: * JS runs fine on modern mobile devices * don&amp;#x2018;t be afraid, code - but test.