SlideShare a Scribd company logo
Mobile web development
techniques and Opera’s
developer tools.

                       dreas
                    An ens r Relations
                    Bopveader Develope
                      u L
                     Gro               e
                                   Phon
Andreas
Bovens
Group Leader Developer Relations


Opera Software ASA              Phone:      +47 23 69 26 68
Waldemar Thranes gate 98        Fax:        +47 23 69 24 01
P.O. Box 2648, St. Hanshaugen   Mobile:     +47 40 03 48 59
0131 Oslo                       E-mail:     andreasb@opera.com
Norway                          Web site:   www.opera.com
Mobile web development techniques (and Opera's developer tools)
Mobile web development techniques (and Opera's developer tools)
Mobile web development techniques (and Opera's developer tools)
Mobile web development techniques (and Opera's developer tools)
“Mobile web development”
Before:
WML, XHTML-MP, XHTML basic,
cHTML, i-HTML ...
                  CC by-nc 2.0 Jaime Pérez http://www.flickr.com/photos/jaimeperez/2562068910/
Before:
WML, XHTML-MP, XHTML basic,
cHTML, i-HTML ...
Mobile browser landscape has
changed dramatically
                     CC by 2.0 Magnera http://www.flickr.com/photos/magnera/4571460751/
Mobile browsers can deal with
“desktop” content just fine :-)
Small Screen Rendering
zoom and pan
...
top notch standards support
more powerful devices
faster connections
“Mobile web development”
“Mobile web development”
             =
normal web development +
mobile specific techniques
Three approaches
to catering for mobile users
1. Do nothing
1. Do nothing
   (or at least not too much)
1. Do nothing
             (or at least not too much)



                                liquid layout
semi-liquid layout
2. Create a separate mobile site
navigation
navigation




mysite.com   m.mysite.com
navigation


      UserAgent sniffing
mysite.com          m.mysite.com
navigation


      UserAgent sniffing
mysite.com                      m.mysite.com




                 CC by-nc-sa 2.0 Tim Dorr http://www.flickr.com/photos/timdorr/2096272747/
navigation


      UserAgent sniffing
mysite.com          m.mysite.com
navigation


       UserAgent sniffing
mysite.com           m.mysite.com


m.mysite.com               mysite.com
navigation


       UserAgent sniffing
mysite.com           m.mysite.com


m.mysite.com               mysite.com

                set cookie
navigation


check cookie, else UserAgent sniffing
  mysite.com            m.mysite.com


  m.mysite.com             mysite.com

                   set cookie
page layout
page layout




Use normal HTML
page layout




             Use normal HTML


Control zoom level with the viewport meta tag
Control zoom level with the viewport meta tag




                  No viewport meta tag:
                  viewport width is interpreted
                  as 850px, and squeezed
                  inside browser width
Control zoom level with the viewport meta tag




                  No viewport meta tag:
                  viewport width is interpreted
                  as 850px, and horizontal
                  panning is required
Control zoom level with the viewport meta tag




                  With viewport meta tag:
                  set value is taken as viewport
                  width, and then fit inside
                  browser width
Control zoom level with the viewport meta tag



                  <meta name="viewport"
                  content="width=320">
Control zoom level with the viewport meta tag



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


                  <meta name="viewport"
                  content="width=device-width">
Control zoom level with the viewport meta tag



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


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



                      makes browser behave
                      like there is no zoom
page layout




             Use normal HTML


Control zoom level with the viewport meta tag
navigation


check cookie, else UserAgent sniffing
  mysite.com            m.mysite.com


  m.mysite.com             mysite.com

                   set cookie
3. Create one site that works everywhere
3. Create one site that works everywhere

  viewport meta tag
3. Create one site that works everywhere

  viewport meta tag
                       media queries
media queries
media queries

@media screen and (max-width: 400px) {
/* CSS for browser widths smaller than 400px */
#nav {margin: 0}
#ad {display: none;}
}
@media screen and (min-width: 401px) and (max-width: 800px) {
/* CSS for browser widths between 401 and 800px */
#ad {float: left}
#content {padding: 5px;}
}
...
media queries

@media screen and (max-width: 400px) {
/* CSS for browser widths smaller than 400px */
#nav {margin: 0}
#ad {display: none;}
}
@media screen and (min-width: 401px) and (max-width: 800px) {
/* CSS for browser widths between 401 and 800px */
#ad {float: left}
#content {padding: 5px;}
}
...
different layouts for all
media queries
                kinds of browser sizes
different layouts for all
  media queries
                       kinds of browser sizes

What about mobile browsers with a virtual
width of e.g. 850px?
different layouts for all
  media queries
                       kinds of browser sizes

What about mobile browsers with a virtual
width of e.g. 850px?

 viewport meta tag     to the rescue!
media queries      max/min-width
                    relates directly to the
viewport meta tag   viewport width value
media queries              max/min-width
                               relates directly to the
  viewport meta tag            viewport width value

                                    e.g. Nokia 5800: 360px

<meta name="viewport" content="width=device-width">
...
@media screen and (max-width: 360px) {
/* CSS for browser widths smaller than 360px */
#nav {margin: 0}
#ad {display: none;}
}
...
1. Do nothing
2. Create a separate mobile site
3. Create one site that works everywhere
1. Do nothing
2. Create a separate mobile site
3. Create one site that works everywhere
             “holy grail”
How to reach the one site holy grail?
How to reach the one site holy grail?

•keep mobile in mind from the very start
How to reach the one site holy grail?

•keep mobile in mind from the very start
•resist the “mobile context” argument, and
 use it the other way around: simplify
 your desktop layout and content
How to reach the one site holy grail?

•keep mobile in mind from the very start
•resist the “mobile context” argument, and
 use it the other way around: simplify
 your desktop layout and content
•reduce the number of HTTP requests
and now: tools!
           (live demo)
http://www.opera.com/developer/tools/

More Related Content

PDF
Dreamweaver CS6, jQuery, PhoneGap, mobile design
KEY
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
PPTX
Making HTML5 Work Everywhere
PPTX
HTML5: An Overview
PDF
Building a Better Web with HTML5 and CSS3
PDF
Disruptive code
PPTX
Introduction to html5
PDF
HTML5 Introduction
Dreamweaver CS6, jQuery, PhoneGap, mobile design
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
Making HTML5 Work Everywhere
HTML5: An Overview
Building a Better Web with HTML5 and CSS3
Disruptive code
Introduction to html5
HTML5 Introduction

What's hot (20)

PPTX
Html5 Overview
PDF
Html5 CSS3 jQuery Basic
PPSX
HTML5, CSS3, and JavaScript
PDF
HTML5 and the dawn of rich mobile web applications
PPT
HTML5 Mullet: Forms & Input Validation
PDF
Bruce Lawson Opera Indonesia
PDF
Nuovi Scenari di Sviluppo: il Mondo degli Ebook
ZIP
Design Tips & Development with jQuery Mobile and PhoneGap
PPTX
3 Approaches to Mobile - An A to Z Primer.
PDF
Mobile Web Development
PDF
Web Standards: Fueling Innovation [Web Design World Boston '08]
PDF
Basics of css and xhtml
PDF
A Snapshot of the Mobile HTML5 Revolution
PDF
Building Cross Platform Mobile Web Apps
PDF
HTML5 and the dawn of rich mobile web applications pt 2
PPTX
Amp by Google: The Present And Future Of Quick Content Delivery
PPTX
Presentation about html5 css3
PDF
Using Web Standards to create Interactive Data Visualizations for the Web
PPTX
HTML5: a quick overview
PPTX
Doing More with LESS for CSS
Html5 Overview
Html5 CSS3 jQuery Basic
HTML5, CSS3, and JavaScript
HTML5 and the dawn of rich mobile web applications
HTML5 Mullet: Forms & Input Validation
Bruce Lawson Opera Indonesia
Nuovi Scenari di Sviluppo: il Mondo degli Ebook
Design Tips & Development with jQuery Mobile and PhoneGap
3 Approaches to Mobile - An A to Z Primer.
Mobile Web Development
Web Standards: Fueling Innovation [Web Design World Boston '08]
Basics of css and xhtml
A Snapshot of the Mobile HTML5 Revolution
Building Cross Platform Mobile Web Apps
HTML5 and the dawn of rich mobile web applications pt 2
Amp by Google: The Present And Future Of Quick Content Delivery
Presentation about html5 css3
Using Web Standards to create Interactive Data Visualizations for the Web
HTML5: a quick overview
Doing More with LESS for CSS
Ad

Similar to Mobile web development techniques (and Opera's developer tools) (20)

PDF
Responsive Websites
KEY
Optimizing content for the "mobile web"
PDF
Mobile seo
PDF
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
PPTX
Responsive Web Design
PDF
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
PDF
Responsive design: techniques and tricks to prepare your websites for the mul...
PDF
CSS3: Using media queries to improve the web site experience
PDF
Making your site mobile-friendly / RIT++
PDF
Media queries
PDF
CSS3, Media Queries, and Responsive Design
PDF
Responsive Web Site Design
PDF
Making your site mobile-friendly - DevCSI Reading 21.07.2010
PDF
Pinkoi Mobile Web
PDF
смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1
PPTX
Responsive Development (ZendCon 2012)
PDF
Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...
PPTX
Responsive web design
PPTX
Chapter 17: Responsive Web Design
PPTX
Mobile Best Practices
Responsive Websites
Optimizing content for the "mobile web"
Mobile seo
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Responsive Web Design
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
Responsive design: techniques and tricks to prepare your websites for the mul...
CSS3: Using media queries to improve the web site experience
Making your site mobile-friendly / RIT++
Media queries
CSS3, Media Queries, and Responsive Design
Responsive Web Site Design
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Pinkoi Mobile Web
смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1
Responsive Development (ZendCon 2012)
Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...
Responsive web design
Chapter 17: Responsive Web Design
Mobile Best Practices
Ad

More from Andreas Bovens (8)

PPTX
Progressive Web Apps: Opera's perspective
PDF
Intro to @viewport & other new Responsive Web Design CSS features
PDF
Fast & Furious: Speed in the Opera browser
PDF
SVG in Opera’s desktop, mobile & TV browsers — edition 2011
PDF
Building rich apps with HTML5 and friends
KEY
SVG in the Opera browser
PDF
Opera and the Open Web platform
PDF
Opera Widgets for Desktop and Opera Dragonfly
Progressive Web Apps: Opera's perspective
Intro to @viewport & other new Responsive Web Design CSS features
Fast & Furious: Speed in the Opera browser
SVG in Opera’s desktop, mobile & TV browsers — edition 2011
Building rich apps with HTML5 and friends
SVG in the Opera browser
Opera and the Open Web platform
Opera Widgets for Desktop and Opera Dragonfly

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
NewMind AI Weekly Chronicles - August'25 Week I
Chapter 3 Spatial Domain Image Processing.pdf
Review of recent advances in non-invasive hemoglobin estimation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Mobile App Security Testing_ A Comprehensive Guide.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Encapsulation theory and applications.pdf
Understanding_Digital_Forensics_Presentation.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine learning based COVID-19 study performance prediction
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
MYSQL Presentation for SQL database connectivity
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Mobile web development techniques (and Opera's developer tools)

  • 1. Mobile web development techniques and Opera’s developer tools. dreas An ens r Relations Bopveader Develope u L Gro e Phon
  • 2. Andreas Bovens Group Leader Developer Relations Opera Software ASA Phone: +47 23 69 26 68 Waldemar Thranes gate 98 Fax: +47 23 69 24 01 P.O. Box 2648, St. Hanshaugen Mobile: +47 40 03 48 59 0131 Oslo E-mail: andreasb@opera.com Norway Web site: www.opera.com
  • 8. Before: WML, XHTML-MP, XHTML basic, cHTML, i-HTML ... CC by-nc 2.0 Jaime Pérez http://www.flickr.com/photos/jaimeperez/2562068910/
  • 9. Before: WML, XHTML-MP, XHTML basic, cHTML, i-HTML ...
  • 10. Mobile browser landscape has changed dramatically CC by 2.0 Magnera http://www.flickr.com/photos/magnera/4571460751/
  • 11. Mobile browsers can deal with “desktop” content just fine :-)
  • 14. ... top notch standards support more powerful devices faster connections
  • 16. “Mobile web development” = normal web development + mobile specific techniques
  • 17. Three approaches to catering for mobile users
  • 19. 1. Do nothing (or at least not too much)
  • 20. 1. Do nothing (or at least not too much) liquid layout semi-liquid layout
  • 21. 2. Create a separate mobile site
  • 23. navigation mysite.com m.mysite.com
  • 24. navigation UserAgent sniffing mysite.com m.mysite.com
  • 25. navigation UserAgent sniffing mysite.com m.mysite.com CC by-nc-sa 2.0 Tim Dorr http://www.flickr.com/photos/timdorr/2096272747/
  • 26. navigation UserAgent sniffing mysite.com m.mysite.com
  • 27. navigation UserAgent sniffing mysite.com m.mysite.com m.mysite.com mysite.com
  • 28. navigation UserAgent sniffing mysite.com m.mysite.com m.mysite.com mysite.com set cookie
  • 29. navigation check cookie, else UserAgent sniffing mysite.com m.mysite.com m.mysite.com mysite.com set cookie
  • 32. page layout Use normal HTML Control zoom level with the viewport meta tag
  • 33. Control zoom level with the viewport meta tag No viewport meta tag: viewport width is interpreted as 850px, and squeezed inside browser width
  • 34. Control zoom level with the viewport meta tag No viewport meta tag: viewport width is interpreted as 850px, and horizontal panning is required
  • 35. Control zoom level with the viewport meta tag With viewport meta tag: set value is taken as viewport width, and then fit inside browser width
  • 36. Control zoom level with the viewport meta tag <meta name="viewport" content="width=320">
  • 37. Control zoom level with the viewport meta tag <meta name="viewport" content="width=320"> <meta name="viewport" content="width=device-width">
  • 38. Control zoom level with the viewport meta tag <meta name="viewport" content="width=320"> <meta name="viewport" content="width=device-width"> makes browser behave like there is no zoom
  • 39. page layout Use normal HTML Control zoom level with the viewport meta tag
  • 40. navigation check cookie, else UserAgent sniffing mysite.com m.mysite.com m.mysite.com mysite.com set cookie
  • 41. 3. Create one site that works everywhere
  • 42. 3. Create one site that works everywhere viewport meta tag
  • 43. 3. Create one site that works everywhere viewport meta tag media queries
  • 45. media queries @media screen and (max-width: 400px) { /* CSS for browser widths smaller than 400px */ #nav {margin: 0} #ad {display: none;} } @media screen and (min-width: 401px) and (max-width: 800px) { /* CSS for browser widths between 401 and 800px */ #ad {float: left} #content {padding: 5px;} } ...
  • 46. media queries @media screen and (max-width: 400px) { /* CSS for browser widths smaller than 400px */ #nav {margin: 0} #ad {display: none;} } @media screen and (min-width: 401px) and (max-width: 800px) { /* CSS for browser widths between 401 and 800px */ #ad {float: left} #content {padding: 5px;} } ...
  • 47. different layouts for all media queries kinds of browser sizes
  • 48. different layouts for all media queries kinds of browser sizes What about mobile browsers with a virtual width of e.g. 850px?
  • 49. different layouts for all media queries kinds of browser sizes What about mobile browsers with a virtual width of e.g. 850px? viewport meta tag to the rescue!
  • 50. media queries max/min-width relates directly to the viewport meta tag viewport width value
  • 51. media queries max/min-width relates directly to the viewport meta tag viewport width value e.g. Nokia 5800: 360px <meta name="viewport" content="width=device-width"> ... @media screen and (max-width: 360px) { /* CSS for browser widths smaller than 360px */ #nav {margin: 0} #ad {display: none;} } ...
  • 52. 1. Do nothing 2. Create a separate mobile site 3. Create one site that works everywhere
  • 53. 1. Do nothing 2. Create a separate mobile site 3. Create one site that works everywhere “holy grail”
  • 54. How to reach the one site holy grail?
  • 55. How to reach the one site holy grail? •keep mobile in mind from the very start
  • 56. How to reach the one site holy grail? •keep mobile in mind from the very start •resist the “mobile context” argument, and use it the other way around: simplify your desktop layout and content
  • 57. How to reach the one site holy grail? •keep mobile in mind from the very start •resist the “mobile context” argument, and use it the other way around: simplify your desktop layout and content •reduce the number of HTTP requests
  • 58. and now: tools! (live demo) http://www.opera.com/developer/tools/