SlideShare una empresa de Scribd logo
1 de 40
Mobile	
  Web
COSCUP	
  2013
Mike	
  Lee
Co-­‐founder	
  /	
  CTO	
  /	
  DevOps	
  @Pinkoi
80000+ Designed Products
Our vision is to build the biggest online
community and marketplace for designers in Asia.
•25%	
  visitors	
  from	
  outside	
  of	
  Taiwan	
  -­‐	
  
Hong	
  Kong,	
  North	
  America,	
  China,	
  Japan,	
  
Singapore,	
  Malaysia
•Help	
  designers	
  grow	
  business	
  to	
  7	
  
countries	
  worldwide
What We’ve Accomplished
Internationally
h"p://gadgetgyan.in/wp-­‐content/uploads/2013/04/smartphone.jpg
Mobiles
Mobile	
  Web
Mobile	
  Web	
  (cont.)
Mobiles	
  are	
  not	
  laptops
Mobile	
  has	
  limitaUon
#	
  less	
  CPU
#	
  less	
  Memory
#	
  slow	
  Network
#	
  smaller	
  screen
If	
  a	
  mobile	
  web	
  is	
  not	
  useful,	
  
it	
  results	
  in	
  a	
  negaUve	
  percepUon	
  
about	
  the	
  brand
Mobile	
  Web	
  (cont.)
Unfixed	
  Page	
  Width
Configure	
  the	
  viewport
<meta	
  name="viewport"	
  content="	
  width=device-­‐width,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  iniDal-­‐scale=1,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  maximum-­‐scale=1,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  user-­‐scalable=no">
h"p://developer.apple.com/library/ios/#DOCUMENTATION/AppleApplicaDons/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html
Separate	
  styles	
  by	
  target	
  viewport	
  size
@media	
  only	
  screen	
  
	
  	
  	
  	
  	
  	
  and	
  (min-­‐width:	
  320px)
	
  	
  	
  	
  	
  	
  and	
  (max-­‐with:	
  480px)	
  	
  {
	
  	
  	
  	
  	
  	
  /*	
  styles	
  */
}
Unfixed	
  Page	
  Width	
  (cont.)
@media	
  queries
Separate	
  styles	
  by	
  target	
  screen	
  size
@media	
  only	
  screen	
  
	
  	
  	
  	
  	
  	
  and	
  (min-­‐device-­‐width:	
  320px)
	
  	
  	
  	
  	
  	
  and	
  (max-­‐device-­‐with:	
  480px)	
  	
  {
	
  	
  	
  	
  	
  	
  /*	
  styles	
  */
}
for	
  JavaScript
var	
  mq	
  =	
  window.matchMedia(‘(min-­‐width:	
  321px)’);
if	
  (mq.matches)	
  {
	
  	
  	
  	
  //	
  window	
  width	
  is	
  at	
  least	
  321px	
  
}	
  else	
  {	
  
	
  	
  	
  	
  //	
  window	
  width	
  is	
  less	
  than	
  321px	
  
}
Unfixed	
  Page	
  Width	
  (cont.)
@media	
  queries
High	
  DPI	
  (like	
  ReUna)
1	
  CSS	
  pixel	
  !=	
  1	
  device	
  pixel
@media	
  only	
  screen	
  
	
  	
  	
  	
  	
  	
  and	
  (min-­‐device-­‐pixel-­‐raDo:	
  2)	
  	
  {
	
  	
  	
  	
  	
  	
  /*	
  some	
  styles	
  for	
  high	
  resoluDon	
  */
}
var	
  dppx	
  =	
  window.devicePixelRaDo;
HTML5	
  Input	
  Types
email,	
  url,	
  search,	
  date,	
  number,	
  tel	
  ...
h"p://html5doctor.com/html5-­‐forms-­‐input-­‐types/
<input	
  type="search">
LBS,	
  HTML5	
  GeolocaUon
navigator.geolocaDon
	
  	
  	
  	
  .getCurrentPosiDon(funcDon(posiDon)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  doSth(posiDon.coords.laDtude,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  posiDon.coords.longitude);	
  
	
  	
  	
  	
  	
  },	
  error)
Caching
navigator.geolocaDon
	
  	
  	
  	
  .getCurrentPosiDon(success,	
  error,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  {maximumAge:	
  60000})
HTML	
  Media	
  Capture
<input	
  type="file"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  accept="image/*"
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  capture="camera">
Images
Embrace	
  embedded	
  content
Inline	
  using	
  Data	
  URIs
li	
  {
	
  	
  	
  	
  background-­‐image:	
  url("data:image/png;base64,iVBORw0KGgoA.....”);
}
Use	
  CSS	
  to	
  render	
  simple	
  images
CSS	
  Sprite
background-­‐image:	
  -­‐webkit-­‐image-­‐set(	
  url(image.png)	
  1x,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  url(image@2x.png)	
  2x);
The	
  future
srcset
<img src="banner.jpeg"
srcset="banner-HD.jpeg 2x,
banner-phone.jpeg 100w,
banner-phone-HD.jpeg 100w 2x">
responsive	
  images
<picture width="500" height="500">
<source media="(min-width: 45em)" src="large.jpg">
<source media="(min-width: 18em)" src="med.jpg">
<source src="small.jpg">
<img src="small.jpg">
</picture>
Images	
  (cont.)
High	
  devices	
  resoluUons
h"p://mobile.smashingmagazine.com/2010/11/17/designing-­‐for-­‐iphone-­‐4-­‐reDna-­‐display-­‐techniques-­‐and-­‐workflow/
Gestures
Click	
  event	
  delayed	
  between	
  300~500ms
Fastclick
Limited	
  touch	
  events
#	
  touchstart
#	
  touchmove
#	
  touchend
Hammer.js
github.com/elabs/fastclick
github.com/EightMedia/hammer.js
40%	
  abandon	
  sites	
  with	
  page	
  load	
  >	
  3s
Performance	
  mahers
Redirect	
  (HTTP	
  301,	
  302)
From	
  150	
  to	
  1000ms	
  per	
  redirect
1.	
  www.mysite.com	
  
2.	
  www.mysite.com/home
3.	
  m.mysite.com
4.	
  m.mysite.com/home
keep	
  your	
  redirect	
  to	
  zero	
  or	
  minimum
Request
Reduce	
  DNS	
  lookups
#	
  200ms	
  per	
  DNS	
  lookup
Reduce	
  HTTP	
  requests
#	
  80ms	
  per	
  HTTP	
  request
Minify	
  &	
  Bundle	
  StaUc	
  Files
Remove	
  comments,	
  spaces
Combine	
  all	
  files	
  into	
  single	
  bundle
#	
  reduce	
  round	
  trips	
  Umes
#	
  Increasing	
  bandwidth	
  efficiency
github.com/mishoo/UglifyJS
github.com/GoalSmashers/clean-­‐css
UglifyJS
#	
  much	
  faster	
  than	
  Google	
  Closure
Clean-­‐css
#	
  much	
  faster	
  than	
  YUI	
  Compressor
Gzip
Increasing	
  bandwidth	
  efficiency
Reduce	
  bytes,	
  every	
  byte	
  counts
More	
  consistent	
  data	
  will	
  compress	
  beher
#	
  CSS	
  properUes	
  in	
  same	
  order
#	
  HTML	
  ahributes	
  in	
  same	
  order
#	
  use	
  consistent	
  casing
#	
  use	
  consistent	
  quoUng
Avoid	
  gzip	
  for	
  image	
  or	
  binary	
  files
Apache
AddOutputFilterByType	
  DEFLATE	
  text/css	
  applicaDon/x-­‐javascript	
  ...
Nginx
gzip	
  on;
gzip_types	
  text/css	
  applicaDon/x-­‐javascript	
  ...;
If	
  you	
  do	
  one	
  thing	
  to	
  improve	
  performance,	
  do	
  this
Gzip	
  (cont.)
JavaScript
JavaScripts	
  at	
  the	
  bohom
Use	
  HTML5	
  new	
  ahributes	
  
Load	
  asynchronously
Non-­‐blocking
<script	
  src=””	
  async	
  defer></script>
JavaScript	
  (cont.)
Don’t	
  send	
  desktop	
  JS	
  to	
  mobile
#	
  jQuery	
  which	
  takes	
  1.5s~8s	
  to	
  be	
  downloaded	
  
and	
  parsed	
  over	
  3G
Micro	
  libraries	
  can	
  ensure	
  you	
  only	
  
use	
  what	
  you	
  need
Zepto
github.com/madrobby/zepto
CSS
Stylesheets	
  at	
  the	
  top
#	
  avoid	
  FOUC	
  (Flash	
  Of	
  Unstyled	
  Content)
#	
  avoid	
  reflow
.box	
  {
	
  	
  	
  	
  transiDon:	
  width	
  2s,	
  height	
  2s,	
  transform	
  2s;
}
@keyframes	
  move	
  {
	
  	
  	
  	
  from	
  {	
  margin-­‐ler:-­‐20%;	
  }	
  
	
  	
  	
  	
  to	
  {	
  margin-­‐ler:100%;	
  }	
  
}
.box	
  {
	
  	
  	
  	
  animaDon:	
  move	
  4s	
  linear	
  0s	
  infinite	
  alternate;
}
CSS	
  (cont.)
Use	
  CSS	
  instead	
  of	
  JS	
  animaUon
Leverage	
  Local	
  Storage
1st	
  Ume	
  request
#	
  load	
  resource
#	
  set	
  local	
  storage
	
  	
  	
  localStorage.setItem(key,	
  value)
Subsequent	
  requests
#	
  load	
  from	
  local	
  storage
	
  	
  	
  localStorage.getItem(key)
#	
  reduce	
  upload	
  bandwidth	
  
HTML5
Not	
  fully	
  supported
Polyfills	
  are	
  too	
  heavy
Progressive	
  enhancement
Feature	
  DetecUon
Modernizr
modernizr.com
if	
  (Modernizr.localstorage)	
  {
	
  	
  	
  	
  //	
  localstorage	
  works!
}
Infinite	
  Scrolling	
  Pahern
Large	
  data	
  sets
Only	
  download	
  subset
Less	
  bytes
Lazy	
  Load	
  Pahern
CondiUonal	
  download
Less	
  resources	
  loaded,	
  fast
Less	
  bytes
RWD	
  (Responsive	
  Web	
  Design)
The	
  browsers	
  get	
  the	
  same	
  code	
  base,	
  
and	
  renders	
  it	
  as	
  defined	
  for	
  the	
  
device
Fixed	
  width	
  is	
  dead,	
  forget	
  pixel	
  perfect!?
RWD	
  (cont.)
Heavy	
  pages
Extra	
  HTTP	
  requests
Slower	
  load	
  Umes
Images	
  are	
  not	
  fluid
Not	
  all	
  devices	
  support	
  media	
  queries
mobile	
  web	
  that	
  pretends	
  to	
  be	
  web	
  is	
  likely	
  to	
  disappoint
RWD	
  (cont.)
For	
  mobile	
  performance,	
  
the	
  best	
  is	
  not	
  always	
  RWD
Don’t	
  use	
  it	
  just	
  because	
  it’s	
  cool	
  
AWD	
  (AdapUve	
  Web	
  Design)
The	
  server	
  idenUfies	
  the	
  device	
  and	
  
sends	
  a	
  different	
  code,	
  including	
  
content,	
  presentaUon	
  and	
  behavior
AWD	
  (cont.)
Predefined	
  set	
  of	
  layout	
  sizes
Redirects	
  
Different	
  URLs	
  (sub-­‐domains)
Too	
  many	
  devices
Too	
  many	
  code	
  bases
SEO	
  issue
One	
  URL	
  works	
  across	
  the	
  browsers
No	
  heavy	
  resources	
  loading
Focus	
  on	
  user	
  experience
Concept	
  Pinkoi	
  used
Yay!!
RESS	
  (Responsive	
  Web	
  Design	
  
+	
  Server	
  Side	
  Components)
Thank you!
http://pinkoi.com/product/1BE15FrN
Thank you!
Email	
  /	
  FB
mike.lee@pinkoi.com

Más contenido relacionado

La actualidad más candente

State of jQuery '09
State of jQuery '09State of jQuery '09
State of jQuery '09jeresig
 
RESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web DesignRESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web DesignDave Olsen
 
Responsive Videos, mehr oder weniger
Responsive Videos, mehr oder wenigerResponsive Videos, mehr oder weniger
Responsive Videos, mehr oder wenigerWalter Ebert
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile WebMorgan Cheng
 
CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlChristian Heilmann
 
The Need For Speed
The Need For SpeedThe Need For Speed
The Need For SpeedAndy Davies
 
How fast are we going now?
How fast are we going now?How fast are we going now?
How fast are we going now?Steve Souders
 
Speed is Essential for a Great Web Experience
Speed is Essential for a Great Web ExperienceSpeed is Essential for a Great Web Experience
Speed is Essential for a Great Web ExperienceAndy Davies
 
Sniffing the Mobile Context
Sniffing the Mobile ContextSniffing the Mobile Context
Sniffing the Mobile ContextAndy Davies
 
HTML5 Who what where when why how
HTML5 Who what where when why howHTML5 Who what where when why how
HTML5 Who what where when why howbrucelawson
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 
Web Performance Workshop - Velocity London 2013
Web Performance Workshop - Velocity London 2013Web Performance Workshop - Velocity London 2013
Web Performance Workshop - Velocity London 2013Andy Davies
 
HTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use TodayHTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use TodayTodd Anglin
 
Making Mobile Sites Faster
Making Mobile Sites FasterMaking Mobile Sites Faster
Making Mobile Sites FasterAndy Davies
 
10 things you can do to speed up your web app today 2016
10 things you can do to speed up your web app today 201610 things you can do to speed up your web app today 2016
10 things you can do to speed up your web app today 2016Chris Love
 
Augmented Reality (AR) - The Future of Mobile Applications?
Augmented Reality (AR) - The Future of Mobile Applications? Augmented Reality (AR) - The Future of Mobile Applications?
Augmented Reality (AR) - The Future of Mobile Applications? Carin Campanario
 
5 single page application principles developers need to know
5 single page application principles developers need to know5 single page application principles developers need to know
5 single page application principles developers need to knowChris Love
 
10 things to make you a Great Mobile Web Developer
10 things to make you a Great Mobile Web Developer10 things to make you a Great Mobile Web Developer
10 things to make you a Great Mobile Web DeveloperChris Love
 
Performance.now() fast but not furious
Performance.now()   fast but not furiousPerformance.now()   fast but not furious
Performance.now() fast but not furiousAnna Migas
 
Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017Christian Heilmann
 

La actualidad más candente (20)

State of jQuery '09
State of jQuery '09State of jQuery '09
State of jQuery '09
 
RESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web DesignRESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web Design
 
Responsive Videos, mehr oder weniger
Responsive Videos, mehr oder wenigerResponsive Videos, mehr oder weniger
Responsive Videos, mehr oder weniger
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile Web
 
CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. Control
 
The Need For Speed
The Need For SpeedThe Need For Speed
The Need For Speed
 
How fast are we going now?
How fast are we going now?How fast are we going now?
How fast are we going now?
 
Speed is Essential for a Great Web Experience
Speed is Essential for a Great Web ExperienceSpeed is Essential for a Great Web Experience
Speed is Essential for a Great Web Experience
 
Sniffing the Mobile Context
Sniffing the Mobile ContextSniffing the Mobile Context
Sniffing the Mobile Context
 
HTML5 Who what where when why how
HTML5 Who what where when why howHTML5 Who what where when why how
HTML5 Who what where when why how
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Web Performance Workshop - Velocity London 2013
Web Performance Workshop - Velocity London 2013Web Performance Workshop - Velocity London 2013
Web Performance Workshop - Velocity London 2013
 
HTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use TodayHTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use Today
 
Making Mobile Sites Faster
Making Mobile Sites FasterMaking Mobile Sites Faster
Making Mobile Sites Faster
 
10 things you can do to speed up your web app today 2016
10 things you can do to speed up your web app today 201610 things you can do to speed up your web app today 2016
10 things you can do to speed up your web app today 2016
 
Augmented Reality (AR) - The Future of Mobile Applications?
Augmented Reality (AR) - The Future of Mobile Applications? Augmented Reality (AR) - The Future of Mobile Applications?
Augmented Reality (AR) - The Future of Mobile Applications?
 
5 single page application principles developers need to know
5 single page application principles developers need to know5 single page application principles developers need to know
5 single page application principles developers need to know
 
10 things to make you a Great Mobile Web Developer
10 things to make you a Great Mobile Web Developer10 things to make you a Great Mobile Web Developer
10 things to make you a Great Mobile Web Developer
 
Performance.now() fast but not furious
Performance.now()   fast but not furiousPerformance.now()   fast but not furious
Performance.now() fast but not furious
 
Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017
 

Destacado

Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Cloud Tu
 
Join Pinkoi!
Join Pinkoi!Join Pinkoi!
Join Pinkoi!HR Pinkoi
 
When Web meet Native App
When Web meet Native AppWhen Web meet Native App
When Web meet Native AppYu-Wei Chuang
 
REST to RESTful Web Service
REST to RESTful Web ServiceREST to RESTful Web Service
REST to RESTful Web Service家弘 周
 
ECX2014 Pinkoi 網站使用者經驗設計的二三事
ECX2014 Pinkoi 網站使用者經驗設計的二三事ECX2014 Pinkoi 網站使用者經驗設計的二三事
ECX2014 Pinkoi 網站使用者經驗設計的二三事悠識學院
 
Buffer's Top 10 Learnings Growing to $10 Million ARR
Buffer's Top 10 Learnings Growing to $10 Million ARRBuffer's Top 10 Learnings Growing to $10 Million ARR
Buffer's Top 10 Learnings Growing to $10 Million ARRBuffer
 

Destacado (7)

Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)
 
Join Pinkoi!
Join Pinkoi!Join Pinkoi!
Join Pinkoi!
 
When Web meet Native App
When Web meet Native AppWhen Web meet Native App
When Web meet Native App
 
REST to RESTful Web Service
REST to RESTful Web ServiceREST to RESTful Web Service
REST to RESTful Web Service
 
ECX2014 Pinkoi 網站使用者經驗設計的二三事
ECX2014 Pinkoi 網站使用者經驗設計的二三事ECX2014 Pinkoi 網站使用者經驗設計的二三事
ECX2014 Pinkoi 網站使用者經驗設計的二三事
 
Buffer's Top 10 Learnings Growing to $10 Million ARR
Buffer's Top 10 Learnings Growing to $10 Million ARRBuffer's Top 10 Learnings Growing to $10 Million ARR
Buffer's Top 10 Learnings Growing to $10 Million ARR
 
Front series A deck
Front series A deckFront series A deck
Front series A deck
 

Similar a Pinkoi Mobile Web

Responsive Websites
Responsive WebsitesResponsive Websites
Responsive WebsitesJoe Seifi
 
The specs behind the sex, mobile-friendly layout beyond the desktop
The specs behind the sex, mobile-friendly layout beyond the desktopThe specs behind the sex, mobile-friendly layout beyond the desktop
The specs behind the sex, mobile-friendly layout beyond the desktopbetabeers
 
Responsive Web in Brief
Responsive Web in BriefResponsive Web in Brief
Responsive Web in BriefEPAM
 
3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.agup2009
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Esri Nederland
 
[cssdevconf] Adaptive Images in RWD
[cssdevconf] Adaptive Images in RWD[cssdevconf] Adaptive Images in RWD
[cssdevconf] Adaptive Images in RWDChristopher Schmitt
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
Mobile Web Development
Mobile Web DevelopmentMobile Web Development
Mobile Web DevelopmentJonathan Snook
 
[rwdsummit2012] Adaptive Images in Responsive Web Design
[rwdsummit2012] Adaptive Images in Responsive Web Design[rwdsummit2012] Adaptive Images in Responsive Web Design
[rwdsummit2012] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Adam Lu
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. ToolboxWojtek Zając
 
[html5tx] Adaptive Images in Responsive Web Design
[html5tx] Adaptive Images in Responsive Web Design[html5tx] Adaptive Images in Responsive Web Design
[html5tx] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5Ron Reiter
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인Daum DNA
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesVitaly Friedman
 
[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
Responsive UX - One size fits all @BigDesign conference #BigD12
Responsive UX - One size fits all   @BigDesign conference #BigD12Responsive UX - One size fits all   @BigDesign conference #BigD12
Responsive UX - One size fits all @BigDesign conference #BigD12touchtitans
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and moreYan Shi
 
Web app and more
Web app and moreWeb app and more
Web app and morefaming su
 

Similar a Pinkoi Mobile Web (20)

Responsive Websites
Responsive WebsitesResponsive Websites
Responsive Websites
 
The specs behind the sex, mobile-friendly layout beyond the desktop
The specs behind the sex, mobile-friendly layout beyond the desktopThe specs behind the sex, mobile-friendly layout beyond the desktop
The specs behind the sex, mobile-friendly layout beyond the desktop
 
Responsive Web in Brief
Responsive Web in BriefResponsive Web in Brief
Responsive Web in Brief
 
3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
 
[cssdevconf] Adaptive Images in RWD
[cssdevconf] Adaptive Images in RWD[cssdevconf] Adaptive Images in RWD
[cssdevconf] Adaptive Images in RWD
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design
 
Mobile Web Development
Mobile Web DevelopmentMobile Web Development
Mobile Web Development
 
[rwdsummit2012] Adaptive Images in Responsive Web Design
[rwdsummit2012] Adaptive Images in Responsive Web Design[rwdsummit2012] Adaptive Images in Responsive Web Design
[rwdsummit2012] Adaptive Images in Responsive Web Design
 
Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. Toolbox
 
[html5tx] Adaptive Images in Responsive Web Design
[html5tx] Adaptive Images in Responsive Web Design[html5tx] Adaptive Images in Responsive Web Design
[html5tx] Adaptive Images in Responsive Web Design
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design
 
Responsive design
Responsive designResponsive design
Responsive design
 
Responsive UX - One size fits all @BigDesign conference #BigD12
Responsive UX - One size fits all   @BigDesign conference #BigD12Responsive UX - One size fits all   @BigDesign conference #BigD12
Responsive UX - One size fits all @BigDesign conference #BigD12
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and more
 
Web app and more
Web app and moreWeb app and more
Web app and more
 

Último

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Último (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Pinkoi Mobile Web

  • 1. Mobile  Web COSCUP  2013 Mike  Lee Co-­‐founder  /  CTO  /  DevOps  @Pinkoi
  • 3. Our vision is to build the biggest online community and marketplace for designers in Asia.
  • 4. •25%  visitors  from  outside  of  Taiwan  -­‐   Hong  Kong,  North  America,  China,  Japan,   Singapore,  Malaysia •Help  designers  grow  business  to  7   countries  worldwide What We’ve Accomplished Internationally
  • 7. Mobile  Web  (cont.) Mobiles  are  not  laptops Mobile  has  limitaUon #  less  CPU #  less  Memory #  slow  Network #  smaller  screen
  • 8. If  a  mobile  web  is  not  useful,   it  results  in  a  negaUve  percepUon   about  the  brand Mobile  Web  (cont.)
  • 9. Unfixed  Page  Width Configure  the  viewport <meta  name="viewport"  content="  width=device-­‐width,                                                                                                                                      iniDal-­‐scale=1,                                                                                                                                        maximum-­‐scale=1,                                                                                                                                      user-­‐scalable=no"> h"p://developer.apple.com/library/ios/#DOCUMENTATION/AppleApplicaDons/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html
  • 10. Separate  styles  by  target  viewport  size @media  only  screen              and  (min-­‐width:  320px)            and  (max-­‐with:  480px)    {            /*  styles  */ } Unfixed  Page  Width  (cont.) @media  queries Separate  styles  by  target  screen  size @media  only  screen              and  (min-­‐device-­‐width:  320px)            and  (max-­‐device-­‐with:  480px)    {            /*  styles  */ }
  • 11. for  JavaScript var  mq  =  window.matchMedia(‘(min-­‐width:  321px)’); if  (mq.matches)  {        //  window  width  is  at  least  321px   }  else  {          //  window  width  is  less  than  321px   } Unfixed  Page  Width  (cont.) @media  queries
  • 12. High  DPI  (like  ReUna) 1  CSS  pixel  !=  1  device  pixel @media  only  screen              and  (min-­‐device-­‐pixel-­‐raDo:  2)    {            /*  some  styles  for  high  resoluDon  */ } var  dppx  =  window.devicePixelRaDo;
  • 13. HTML5  Input  Types email,  url,  search,  date,  number,  tel  ... h"p://html5doctor.com/html5-­‐forms-­‐input-­‐types/ <input  type="search">
  • 14. LBS,  HTML5  GeolocaUon navigator.geolocaDon        .getCurrentPosiDon(funcDon(posiDon)  {                  doSth(posiDon.coords.laDtude,                                        posiDon.coords.longitude);            },  error) Caching navigator.geolocaDon        .getCurrentPosiDon(success,  error,                                                                                      {maximumAge:  60000})
  • 15. HTML  Media  Capture <input  type="file"                            accept="image/*"                          capture="camera">
  • 16. Images Embrace  embedded  content Inline  using  Data  URIs li  {        background-­‐image:  url("data:image/png;base64,iVBORw0KGgoA.....”); } Use  CSS  to  render  simple  images CSS  Sprite
  • 17. background-­‐image:  -­‐webkit-­‐image-­‐set(  url(image.png)  1x,                                                                                                                                                url(image@2x.png)  2x); The  future srcset <img src="banner.jpeg" srcset="banner-HD.jpeg 2x, banner-phone.jpeg 100w, banner-phone-HD.jpeg 100w 2x"> responsive  images <picture width="500" height="500"> <source media="(min-width: 45em)" src="large.jpg"> <source media="(min-width: 18em)" src="med.jpg"> <source src="small.jpg"> <img src="small.jpg"> </picture> Images  (cont.) High  devices  resoluUons h"p://mobile.smashingmagazine.com/2010/11/17/designing-­‐for-­‐iphone-­‐4-­‐reDna-­‐display-­‐techniques-­‐and-­‐workflow/
  • 18. Gestures Click  event  delayed  between  300~500ms Fastclick Limited  touch  events #  touchstart #  touchmove #  touchend Hammer.js github.com/elabs/fastclick github.com/EightMedia/hammer.js
  • 19. 40%  abandon  sites  with  page  load  >  3s Performance  mahers
  • 20. Redirect  (HTTP  301,  302) From  150  to  1000ms  per  redirect 1.  www.mysite.com   2.  www.mysite.com/home 3.  m.mysite.com 4.  m.mysite.com/home keep  your  redirect  to  zero  or  minimum
  • 21. Request Reduce  DNS  lookups #  200ms  per  DNS  lookup Reduce  HTTP  requests #  80ms  per  HTTP  request
  • 22. Minify  &  Bundle  StaUc  Files Remove  comments,  spaces Combine  all  files  into  single  bundle #  reduce  round  trips  Umes #  Increasing  bandwidth  efficiency github.com/mishoo/UglifyJS github.com/GoalSmashers/clean-­‐css UglifyJS #  much  faster  than  Google  Closure Clean-­‐css #  much  faster  than  YUI  Compressor
  • 23. Gzip Increasing  bandwidth  efficiency Reduce  bytes,  every  byte  counts More  consistent  data  will  compress  beher #  CSS  properUes  in  same  order #  HTML  ahributes  in  same  order #  use  consistent  casing #  use  consistent  quoUng Avoid  gzip  for  image  or  binary  files
  • 24. Apache AddOutputFilterByType  DEFLATE  text/css  applicaDon/x-­‐javascript  ... Nginx gzip  on; gzip_types  text/css  applicaDon/x-­‐javascript  ...; If  you  do  one  thing  to  improve  performance,  do  this Gzip  (cont.)
  • 25. JavaScript JavaScripts  at  the  bohom Use  HTML5  new  ahributes   Load  asynchronously Non-­‐blocking <script  src=””  async  defer></script>
  • 26. JavaScript  (cont.) Don’t  send  desktop  JS  to  mobile #  jQuery  which  takes  1.5s~8s  to  be  downloaded   and  parsed  over  3G Micro  libraries  can  ensure  you  only   use  what  you  need Zepto github.com/madrobby/zepto
  • 27. CSS Stylesheets  at  the  top #  avoid  FOUC  (Flash  Of  Unstyled  Content) #  avoid  reflow
  • 28. .box  {        transiDon:  width  2s,  height  2s,  transform  2s; } @keyframes  move  {        from  {  margin-­‐ler:-­‐20%;  }          to  {  margin-­‐ler:100%;  }   } .box  {        animaDon:  move  4s  linear  0s  infinite  alternate; } CSS  (cont.) Use  CSS  instead  of  JS  animaUon
  • 29. Leverage  Local  Storage 1st  Ume  request #  load  resource #  set  local  storage      localStorage.setItem(key,  value) Subsequent  requests #  load  from  local  storage      localStorage.getItem(key) #  reduce  upload  bandwidth  
  • 30. HTML5 Not  fully  supported Polyfills  are  too  heavy Progressive  enhancement Feature  DetecUon Modernizr modernizr.com if  (Modernizr.localstorage)  {        //  localstorage  works! }
  • 31. Infinite  Scrolling  Pahern Large  data  sets Only  download  subset Less  bytes
  • 32. Lazy  Load  Pahern CondiUonal  download Less  resources  loaded,  fast Less  bytes
  • 33. RWD  (Responsive  Web  Design) The  browsers  get  the  same  code  base,   and  renders  it  as  defined  for  the   device Fixed  width  is  dead,  forget  pixel  perfect!?
  • 34. RWD  (cont.) Heavy  pages Extra  HTTP  requests Slower  load  Umes Images  are  not  fluid Not  all  devices  support  media  queries mobile  web  that  pretends  to  be  web  is  likely  to  disappoint
  • 35. RWD  (cont.) For  mobile  performance,   the  best  is  not  always  RWD Don’t  use  it  just  because  it’s  cool  
  • 36. AWD  (AdapUve  Web  Design) The  server  idenUfies  the  device  and   sends  a  different  code,  including   content,  presentaUon  and  behavior
  • 37. AWD  (cont.) Predefined  set  of  layout  sizes Redirects   Different  URLs  (sub-­‐domains) Too  many  devices Too  many  code  bases SEO  issue
  • 38. One  URL  works  across  the  browsers No  heavy  resources  loading Focus  on  user  experience Concept  Pinkoi  used Yay!! RESS  (Responsive  Web  Design   +  Server  Side  Components)
  • 40. Thank you! Email  /  FB mike.lee@pinkoi.com