SlideShare une entreprise Scribd logo
1  sur  60
Télécharger pour lire hors ligne
Installation Files
! If you haven't already, be sure to download the installation
files for Troy Miles' tutorial from here:
!
! http://10.35.0.2/velocity/
Debugging and Tuning
Mobile Web Sites with
Modern Web Browsers
24 June 2014
Me
! Troy Miles - Senior Software Engineer
! Kelley Blue Book, Irvine, CA
! @therockncoder
! rockncoder@gmail.com
All of the materials
! Slides
! Links
! Notes
! https://bitly.com/bundles/rockncoder/4
The Agenda
! The Mobile Web
! Debugging
! Performance Measuring & Improving
! Memory Leaks
iPhone
! On-sale June 29, 2007
! Initially the only way to write iPhone "apps" was via the web
! Introduced Mobile Safari browser
! Lots of mobile web features
iPhone Mobile Web Features
! Viewport meta tag
! Startup image
! Hide browser UI
! Home screen icons
! No debugging features
Android
! First phone HTC Dream aka G1
! Released October 22, 2008
! Like Safari it is Webkit based
! No debugging features
Analogs
! All of the major mobile browsers have desktop cousins
! Android - Chrome
! iOS - Safari
! Windows Phone - IE
Debugging
! Understanding the scope of the problem
! Debugging without a debugger
! What is weinre?
Understanding the problem
! You can do a lot with analogs but you can't…
! Touch
! Render correctly
! Measure performance
Debugging without a debugger
! alert()
! iPhone Developer Debug Console
! Proprietary solutions
What is weinre?
! Created by Patrick Mueller
! Stands for WEb INspector REmote
! Like Firebug but only for Webkit based browser
! Designed to work remotely, good for mobile
What does it give you?
! See HTML & CSS
! View the console
! View resources like local and session storage
! Network calls
! Performance measures
Three main parts of weinre
! Debug Server
! Debug Client
! Debug Target
How does it work?
! The debug client and target communicate via XHR with the
server
! Both the debug target and client are written in JavaScript
Installation & running
! For Windows, Mac OS X, and Linux based machines
! Delivered as a npm module
! sudo npm -g install weinre
! from the terminal - weinre
! weinre --boundHost -all-
! Or use an online host
Why use an online host?
! You aren't a node user
! You have firewall issues
! You, like me, are lazy
! http://debug.build.phonegap.com/
Multi-user Model
! Add a hash tag + id to the end both the client and target URLs
! Minimalistic security measure
! Still transmitted in the clear
! Can also add the id to a bookmarklet
Using a bookmarklet
! It is easy to forget to remove the weinre script from a page
! You may not have access to the source code for a page
! It is not easy to get a bookmark onto a mobile device
! Remember: if you reload the page the injected script is gone!
Adding a bookmarklet - Safari Edition
! Open Safari
! Go to your debug Server web page
! Scroll down to the bookmarklet textarea
! Tap and release the textarea to zoom it
! Tap it again until the magnifying glass appears
! Release it and the edit options should appear
! Tap Select All
! Tap Copy
Adding a bookmarklet - Safari Edition
! Tap Done
! Tap the Share icon
! Tap the Bookmark icon
! Give your bookmarklet a name
! Tap Save
! Tap the Bookmark icon
! Find your saved bookmark
! Tap Edit in the lower right hand corner
Adding a bookmarklet - Safari Edition
! Tap your bookmark
! Tap the URL line
! Tap the "x" to erase the URL
! Tap and release the Address line to make the Paste option
appear
! Tap Paste
! Tap Done
! Tap Done again
Adding a bookmarklet - Safari Edition
! Return to your debug page
! Find your bookmark and tap it
Adding a bookmarklet - Chrome Edition
! Go to your debug server page
! Scroll down to the bookmarklet textarea
! Long press until the selectors appear
! Move the selectors to encompass the entire textarea
! Tap the copy icon
! Tap the favorite icon
! Erase the URL text
! Long press until PASTE appears
Adding a bookmarklet - Chrome Edition
! Tap PASTE
! Rename bookmark if desired
! Tap Save
! Return to you debug page
! From the URL bar, begin typing the name of your bookmark
! When it appears in the list of suggestions, tap it
Using weinre
! Remote
! Elements
! Resources
! Network
! Timeline
! Console
Client/Target Colors
! blue - online but not active
! green - online and active
! red - disconnected about to disappear
weinre summary
! Only webkit browsers
! No JavaScript debugging
! The target script is 151 KB
! The communication between client and target can be sluggish
! Not perfect, but better than alerts
Opera Dragonfly
! The first browser to support remote debugging
! Had to use its mobile & desktop browser
! Like weinre communication via HTTP - no need to connect
! This has relegated their Dragonfly remote debugging obsolete
! Opera’s new browser supports remote debugging via Chrome
Dev Tools
Safari
! iOS gained remote debugging capabilities starting with iOS 6
and Safari 6
! iOS 6 release September 2012
! Only works with Apple devices iPhone, iPad, Mac OS X
! Devices must be connected via USB
Safari iPhone Debugging Demo
! On iPhone, Settings -> Safari -> Advanced -> WebInspector,
turn on
! From Safari, Preferences -> Advanced
! Click Show Develop menu in menu bar
! Using Apple approved cable connect iPhone to Mac
! On iPhone, use Safari to open a web page
! On Mac, Develop -> <your device name> -> <web page>
Safari UI
! Resources
! Timeline
! Debugger
! Console / Inspect
! Styles
! Layers
! Node
! Resource
Safari Caveats
! Remote debugging only works for iOS 6 or greater devices
! 9% of iOS devices on iOS 6
! 89% of iOS devices on iOS 7
! For the 2% on iOS 5 or below, use weinre
Chrome
! Remote debugging introduced with Chrome for Android Beta
! Released in Early 2012
! Initially required Android SDK and the Android Debug Bridge
(ADB)
! Now included in Chrome, no need for Android SDK
Chrome Nexus 4 Debugging Demo
! Preparing Android phone
! Settings -> About phone -> Build number, tap until it says you
are a developer
! Settings -> Developer options -> USB debugging, select it
! In Chrome -> Hot dog icon -> Tools -> Inspect devices
! Check, Discover USB devices
! Connect Android device to computer via USB
! On Android phone, use Chrome to open a web page
Chrome UI
! Inspect
! Elements
! Network
! Sources
! Timeline
! Profiles
! Resources
! Audits
Chrome UI
! Console
! Show Console
! Show Settings
! Show Screen Cast
Chrome Caveats
! Every Android device is different, your steps may vary
! Only for 4.0 and greater phones
! Use weinre for the rest
Amazon Silk
! Silk is the browser used on the Kindle Fire and the Fire Phone
! Silk is Webkit based
! Can use weinre on it
! Can also remote debug with Chrome dev tools and the ADB
How fast is 4G?
! No actual 4G standard
! Name for the standard is International Mobile
Telecommunication Advanced
! The standard doesn't have minimum speeds
! Maxs moving speeds to 100 Mbps, and 1 Gbps for stationary
! Latency is high on both 3G and 4G networks averaging over
100ms across all carriers
Throttling your website
! The basics of throttling
! Proxy phone through your development machine
! Throttle the speed of development machine
! For the Mac we use:
! an Xcode tool, Network Link Conditioner
! The free edition of Burp
! For the PC
! Fiddler
! A Fiddler extension, Connection Simulator
Throttling via a Mac
! System Preferences -> Network Link Conditioner
! Select a Profile
! Turn on
! Launch Burp
! Proxy -> Options, Select the single proxy listener
! Click Edit, Click Binding tab, Click Specific address
! Choose your IP address
! Click OK
Throttling via a PC
! In Fiddler, Go Tools -> Fiddler Options…
! Click the Connections tab
! Click Allow remote computers to connect
! In Fiddler, Click Bandwidth Simulation -> Configure…
! Select a Simulation Mode
! Select a Bandwidth Midpoint
! Click Apply
Proxying an Android device
! Your device and dev box must be on the same network
! Settings -> Wi-Fi
! Long press Wi-Fi connection
! Tap Modify network
! Check Show advanced options
! Proxy, select Manual
! Enter IP address and Proxy port
! Tap Save
Proxying an iOS device
! Settings -> Wi-Fi -> tap info icon
! Scroll to the bottom of the page
! Tap Manual
! Enter Server and Port
! Tap Wi-Fi
Turning off caching via Chrome
! Caching is great
! It speeds up your site for return visitors
! But it covers up speed issue during development
Turning off caching via Safari
! Developer -> Your iOS device -> Your web page
! Click Timelines
! Press command + shift + R to load with no cache
! Press command + R to load with caching
Performance Measuring
! Timeline is the tab for performance measuring
! Can view the time three ways:
- Events
- Frames
- Memory
Intro to HTML Rendering
! DOM creation - web page parsed into a tree of nodes called
the Document Object Model
! Render Tree creation - DOM is parsed into a tree of visible
objects called the Render Tree
! Rendering - The render tree is goes through “layout”, all of the
nodes defined in screen coordinates
! Painting - The render is traversed which each node sent to
the UI
What is a layer?
! A layer is a portion of the web page which has been converted
into a texture and moved to the GPU
! This conversion is where the performance boost comes from
! Layers are not FREE
- They use system and GPU memory
- There is CPU overhead
! Remember: Compositing is cheap, repainting is expensive
Performance Improving
! There are no hard and fast algorithms
! The performance tools will help, but you have to do the hard
work
! My favorite is the continuous page repainting mode
Rules of Thumb
! Prefer requestAnimFrame over setTimeout or setInterval
! Prefer CSS animation over JavaScript
! Be careful of mixing CSS reads and writes
CSS Performance Hit
! Triggers Composite
- opacity
- webkit-transform
! Triggers Paint and Composite
- color, background color, box-shadow
! Triggers Layout, Paint, and Composite
- left, top
- width, height
- visibility
Memory Leaks
! Intro to memory leaks
! Why its your fault?
! Determining that a leak exists
! Finding the cause of the leak
Intro to memory leaks
! JavaScript uses reference counting to do garbage collection
! When an object has no one referencing it, it can be collected
! If two objects point to each other, they will never be collected
! It is easy to create a leaky JavaScript apps
! Leaks have always existed in JavaScript apps
! The only difference is that now JavaScript apps are persistent
Why its your fault?
! In JavaScript we don’t think about memory leaks
! Even when we think we may have one, too hard to find
! Leaks often involve some object creation code which should
have been checked better
Determining that a leak exists
! Leaks take time to be apparent, sometimes a long time
! The main tools are the Timelines and Profiles tabs
! The timelines, memory display shows current memory usage
! The profiles heap snapshot and heap allocation can help you
finger the culprit
! Make use of the collect garbage button
Finding the cause of the leak
! The Profiles tab’s record heap allocation is your best friend
! It can help you determine which object is holding memory
! Determining who is hold a reference to it is up to you
! Beware of closures
Summary
! weinre
! Safari and Chrome remote debugging
! Performance measuring and improving
! Memory leaks
! https://bitly.com/bundles/rockncoder/4
! rockncoder@gmail.com

Contenu connexe

Tendances

Workshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic FrameworkWorkshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic FrameworkAayush Shrestha
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapQuang Minh Dao
 
Mobile Enablement And Intelligence
Mobile Enablement And IntelligenceMobile Enablement And Intelligence
Mobile Enablement And IntelligenceRashmika Nawaratne
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapRamesh Nair
 
Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentJustin James
 
Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Matheus Cardoso
 
Building Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicKadhem Soltani
 
Rapid mobile development with Ionic framework - Voxxdays Ticino 2015
Rapid mobile development with Ionic framework - Voxxdays Ticino 2015Rapid mobile development with Ionic framework - Voxxdays Ticino 2015
Rapid mobile development with Ionic framework - Voxxdays Ticino 2015Alessio Delmonti
 
From mobile browser to mobile app
From mobile browser to mobile appFrom mobile browser to mobile app
From mobile browser to mobile appRyan Stewart
 
How To Create One App For All Platforms using PhoneGap
How To Create One App For All Platforms using PhoneGapHow To Create One App For All Platforms using PhoneGap
How To Create One App For All Platforms using PhoneGapMobiDev
 
Building Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapBuilding Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapPrajyot Mainkar
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap InsightsMonaca
 
PhoneGap Day US 2013 - Chrome Packaged Apps
PhoneGap Day US 2013 - Chrome Packaged AppsPhoneGap Day US 2013 - Chrome Packaged Apps
PhoneGap Day US 2013 - Chrome Packaged AppsPhoneGap
 
Hybrid Apps with Ionic Framework
Hybrid Apps with Ionic FrameworkHybrid Apps with Ionic Framework
Hybrid Apps with Ionic FrameworkBramus Van Damme
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapNick Landry
 
iOS & Android Application Development - Pee Dee User Group Meeting
iOS & Android Application Development - Pee Dee User Group MeetingiOS & Android Application Development - Pee Dee User Group Meeting
iOS & Android Application Development - Pee Dee User Group MeetingJim Tochterman
 
Debugging and deploying with phone gap
Debugging and deploying with phone gapDebugging and deploying with phone gap
Debugging and deploying with phone gapRyan Stewart
 

Tendances (20)

Workshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic FrameworkWorkshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic Framework
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Mobile Enablement And Intelligence
Mobile Enablement And IntelligenceMobile Enablement And Intelligence
Mobile Enablement And Intelligence
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application Development
 
Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!
 
Building Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and Ionic
 
Rapid mobile development with Ionic framework - Voxxdays Ticino 2015
Rapid mobile development with Ionic framework - Voxxdays Ticino 2015Rapid mobile development with Ionic framework - Voxxdays Ticino 2015
Rapid mobile development with Ionic framework - Voxxdays Ticino 2015
 
From mobile browser to mobile app
From mobile browser to mobile appFrom mobile browser to mobile app
From mobile browser to mobile app
 
How To Create One App For All Platforms using PhoneGap
How To Create One App For All Platforms using PhoneGapHow To Create One App For All Platforms using PhoneGap
How To Create One App For All Platforms using PhoneGap
 
Building Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapBuilding Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGap
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap Insights
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
PhoneGap Day US 2013 - Chrome Packaged Apps
PhoneGap Day US 2013 - Chrome Packaged AppsPhoneGap Day US 2013 - Chrome Packaged Apps
PhoneGap Day US 2013 - Chrome Packaged Apps
 
Hybrid Apps with Ionic Framework
Hybrid Apps with Ionic FrameworkHybrid Apps with Ionic Framework
Hybrid Apps with Ionic Framework
 
Building mobile apps using Phonegap
Building mobile apps using PhonegapBuilding mobile apps using Phonegap
Building mobile apps using Phonegap
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
 
iOS & Android Application Development - Pee Dee User Group Meeting
iOS & Android Application Development - Pee Dee User Group MeetingiOS & Android Application Development - Pee Dee User Group Meeting
iOS & Android Application Development - Pee Dee User Group Meeting
 
All About Phonegap
All About Phonegap All About Phonegap
All About Phonegap
 
Debugging and deploying with phone gap
Debugging and deploying with phone gapDebugging and deploying with phone gap
Debugging and deploying with phone gap
 

En vedette

The Modern Web Part 3: Social Networking
The Modern Web Part 3: Social NetworkingThe Modern Web Part 3: Social Networking
The Modern Web Part 3: Social NetworkingDavid Pallmann
 
I know how to search the internet,
I know how to search the internet,I know how to search the internet,
I know how to search the internet,Hindie Dershowitz
 
How to search the Internet, a guide to save time and effort
How to search the Internet, a guide to save time and effortHow to search the Internet, a guide to save time and effort
How to search the Internet, a guide to save time and effortPete S
 
Google webmaster guide for starters
Google webmaster guide for startersGoogle webmaster guide for starters
Google webmaster guide for startersjatindsim
 
Windows 8 and the Cloud
Windows 8 and the CloudWindows 8 and the Cloud
Windows 8 and the CloudDavid Pallmann
 
Internet Search Tips featuring Google
Internet Search Tips featuring GoogleInternet Search Tips featuring Google
Internet Search Tips featuring GoogleLisa Hartman
 
Internet Search Tips (Google)
Internet Search Tips (Google)Internet Search Tips (Google)
Internet Search Tips (Google)Lisa Hartman
 
When worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the CloudWhen worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the CloudDavid Pallmann
 
Calculate your Water Footprint at H2O Conserve
Calculate your Water Footprint at H2O ConserveCalculate your Water Footprint at H2O Conserve
Calculate your Water Footprint at H2O Conserveguest5961519
 
How to develop modern web application framework
How to develop modern web application frameworkHow to develop modern web application framework
How to develop modern web application frameworktechmemo
 
The Modern Web, Part 1: Mobility
The Modern Web, Part 1: MobilityThe Modern Web, Part 1: Mobility
The Modern Web, Part 1: MobilityDavid Pallmann
 
Internet Search
Internet SearchInternet Search
Internet SearchD Houseman
 
WATER FOOTPRINT ACCOUNTING FOR CATCHMENTS AND RIVER BASINS
WATER FOOTPRINT ACCOUNTING FOR CATCHMENTS AND RIVER BASINSWATER FOOTPRINT ACCOUNTING FOR CATCHMENTS AND RIVER BASINS
WATER FOOTPRINT ACCOUNTING FOR CATCHMENTS AND RIVER BASINSGlorynel Ojeda-Matos
 
Manuele Margni, CIRAIG - Behind the Water Footprint Stream: Metrics and Initi...
Manuele Margni, CIRAIG - Behind the Water Footprint Stream: Metrics and Initi...Manuele Margni, CIRAIG - Behind the Water Footprint Stream: Metrics and Initi...
Manuele Margni, CIRAIG - Behind the Water Footprint Stream: Metrics and Initi...CWS_2010
 
Web of knowledge advanced features
Web of knowledge advanced featuresWeb of knowledge advanced features
Web of knowledge advanced featuresLisa Hartman
 
Using the internet for search
Using the internet for searchUsing the internet for search
Using the internet for searchDr-Heba Mustafa
 
The Modern Web, Part 2: HTML5
The Modern Web, Part 2: HTML5The Modern Web, Part 2: HTML5
The Modern Web, Part 2: HTML5David Pallmann
 
Characteristics of a bad website
Characteristics of a bad websiteCharacteristics of a bad website
Characteristics of a bad websiteA Website Designer
 

En vedette (20)

The Modern Web Part 3: Social Networking
The Modern Web Part 3: Social NetworkingThe Modern Web Part 3: Social Networking
The Modern Web Part 3: Social Networking
 
I know how to search the internet,
I know how to search the internet,I know how to search the internet,
I know how to search the internet,
 
How to search the Internet, a guide to save time and effort
How to search the Internet, a guide to save time and effortHow to search the Internet, a guide to save time and effort
How to search the Internet, a guide to save time and effort
 
Affordable web design
Affordable web designAffordable web design
Affordable web design
 
Google webmaster guide for starters
Google webmaster guide for startersGoogle webmaster guide for starters
Google webmaster guide for starters
 
Windows 8 and the Cloud
Windows 8 and the CloudWindows 8 and the Cloud
Windows 8 and the Cloud
 
Internet Search Tips featuring Google
Internet Search Tips featuring GoogleInternet Search Tips featuring Google
Internet Search Tips featuring Google
 
Internet Search Tips (Google)
Internet Search Tips (Google)Internet Search Tips (Google)
Internet Search Tips (Google)
 
When worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the CloudWhen worlds Collide: HTML5 Meets the Cloud
When worlds Collide: HTML5 Meets the Cloud
 
Calculate your Water Footprint at H2O Conserve
Calculate your Water Footprint at H2O ConserveCalculate your Water Footprint at H2O Conserve
Calculate your Water Footprint at H2O Conserve
 
Bad websites
Bad websitesBad websites
Bad websites
 
How to develop modern web application framework
How to develop modern web application frameworkHow to develop modern web application framework
How to develop modern web application framework
 
The Modern Web, Part 1: Mobility
The Modern Web, Part 1: MobilityThe Modern Web, Part 1: Mobility
The Modern Web, Part 1: Mobility
 
Internet Search
Internet SearchInternet Search
Internet Search
 
WATER FOOTPRINT ACCOUNTING FOR CATCHMENTS AND RIVER BASINS
WATER FOOTPRINT ACCOUNTING FOR CATCHMENTS AND RIVER BASINSWATER FOOTPRINT ACCOUNTING FOR CATCHMENTS AND RIVER BASINS
WATER FOOTPRINT ACCOUNTING FOR CATCHMENTS AND RIVER BASINS
 
Manuele Margni, CIRAIG - Behind the Water Footprint Stream: Metrics and Initi...
Manuele Margni, CIRAIG - Behind the Water Footprint Stream: Metrics and Initi...Manuele Margni, CIRAIG - Behind the Water Footprint Stream: Metrics and Initi...
Manuele Margni, CIRAIG - Behind the Water Footprint Stream: Metrics and Initi...
 
Web of knowledge advanced features
Web of knowledge advanced featuresWeb of knowledge advanced features
Web of knowledge advanced features
 
Using the internet for search
Using the internet for searchUsing the internet for search
Using the internet for search
 
The Modern Web, Part 2: HTML5
The Modern Web, Part 2: HTML5The Modern Web, Part 2: HTML5
The Modern Web, Part 2: HTML5
 
Characteristics of a bad website
Characteristics of a bad websiteCharacteristics of a bad website
Characteristics of a bad website
 

Similaire à Debugging and Tuning Mobile Web Sites with Modern Web Browsers

Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011davyjones
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Todaydavyjones
 
Debugging mobile websites and web apps
Debugging mobile websites and web appsDebugging mobile websites and web apps
Debugging mobile websites and web appsMihai Corlan
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & DebuggingIvano Malavolta
 
Performance Optimization for Mobile Web | Fresh Tilled Soil
Performance Optimization for Mobile Web | Fresh Tilled SoilPerformance Optimization for Mobile Web | Fresh Tilled Soil
Performance Optimization for Mobile Web | Fresh Tilled SoilFresh Tilled Soil
 
Breaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with DrupalBreaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with DrupalAcquia
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDee Sadler
 
Phonegap facebook- plugin
Phonegap facebook- pluginPhonegap facebook- plugin
Phonegap facebook- pluginSteve Gill
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGapJoseph Labrecque
 
Intro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap BuildIntro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap BuildChris Griffith
 
Ember Conf 2016: Building Mobile Apps with Ember
Ember Conf 2016: Building Mobile Apps with EmberEmber Conf 2016: Building Mobile Apps with Ember
Ember Conf 2016: Building Mobile Apps with EmberAlex Blom
 
PhoneGap talk from Singapore
PhoneGap talk from SingaporePhoneGap talk from Singapore
PhoneGap talk from SingaporeSteve Gill
 
Cross Platform Development Strategies with vendor review and PhoneGap case study
Cross Platform Development Strategies with vendor review and PhoneGap case studyCross Platform Development Strategies with vendor review and PhoneGap case study
Cross Platform Development Strategies with vendor review and PhoneGap case studyElegant Technologies, LLC
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapRaymond Camden
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGapMihai Corlan
 
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014Maximiliano Firtman
 

Similaire à Debugging and Tuning Mobile Web Sites with Modern Web Browsers (20)

The future is hybrid
The future is hybridThe future is hybrid
The future is hybrid
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Debugging mobile websites and web apps
Debugging mobile websites and web appsDebugging mobile websites and web apps
Debugging mobile websites and web apps
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
 
Performance Optimization for Mobile Web | Fresh Tilled Soil
Performance Optimization for Mobile Web | Fresh Tilled SoilPerformance Optimization for Mobile Web | Fresh Tilled Soil
Performance Optimization for Mobile Web | Fresh Tilled Soil
 
Breaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with DrupalBreaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with Drupal
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile design
 
Phonegap facebook- plugin
Phonegap facebook- pluginPhonegap facebook- plugin
Phonegap facebook- plugin
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
 
PhoneGap/Cordova
PhoneGap/CordovaPhoneGap/Cordova
PhoneGap/Cordova
 
Intro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap BuildIntro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap Build
 
Ember Conf 2016: Building Mobile Apps with Ember
Ember Conf 2016: Building Mobile Apps with EmberEmber Conf 2016: Building Mobile Apps with Ember
Ember Conf 2016: Building Mobile Apps with Ember
 
PhoneGap talk from Singapore
PhoneGap talk from SingaporePhoneGap talk from Singapore
PhoneGap talk from Singapore
 
Cross Platform Development Strategies with vendor review and PhoneGap case study
Cross Platform Development Strategies with vendor review and PhoneGap case studyCross Platform Development Strategies with vendor review and PhoneGap case study
Cross Platform Development Strategies with vendor review and PhoneGap case study
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Webapi
WebapiWebapi
Webapi
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGap
 
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
 

Plus de Troy Miles

Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web ServersTroy Miles
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot CampTroy Miles
 
AWS Lambda Function with Kotlin
AWS Lambda Function with KotlinAWS Lambda Function with Kotlin
AWS Lambda Function with KotlinTroy Miles
 
React Native One Day
React Native One DayReact Native One Day
React Native One DayTroy Miles
 
React Native Evening
React Native EveningReact Native Evening
React Native EveningTroy Miles
 
Intro to React
Intro to ReactIntro to React
Intro to ReactTroy Miles
 
React Development with the MERN Stack
React Development with the MERN StackReact Development with the MERN Stack
React Development with the MERN StackTroy Miles
 
Angular Application Testing
Angular Application TestingAngular Application Testing
Angular Application TestingTroy Miles
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?Troy Miles
 
Angular Weekend
Angular WeekendAngular Weekend
Angular WeekendTroy Miles
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN StackTroy Miles
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScriptTroy Miles
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in ClojureTroy Miles
 
MEAN Stack Warm-up
MEAN Stack Warm-upMEAN Stack Warm-up
MEAN Stack Warm-upTroy Miles
 
The JavaScript You Wished You Knew
The JavaScript You Wished You KnewThe JavaScript You Wished You Knew
The JavaScript You Wished You KnewTroy Miles
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Troy Miles
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutesTroy Miles
 
Quick & Dirty & MEAN
Quick & Dirty & MEANQuick & Dirty & MEAN
Quick & Dirty & MEANTroy Miles
 
A Quick Intro to ReactiveX
A Quick Intro to ReactiveXA Quick Intro to ReactiveX
A Quick Intro to ReactiveXTroy Miles
 

Plus de Troy Miles (20)

Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web Servers
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot Camp
 
AWS Lambda Function with Kotlin
AWS Lambda Function with KotlinAWS Lambda Function with Kotlin
AWS Lambda Function with Kotlin
 
React Native One Day
React Native One DayReact Native One Day
React Native One Day
 
React Native Evening
React Native EveningReact Native Evening
React Native Evening
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
React Development with the MERN Stack
React Development with the MERN StackReact Development with the MERN Stack
React Development with the MERN Stack
 
Angular Application Testing
Angular Application TestingAngular Application Testing
Angular Application Testing
 
ReactJS.NET
ReactJS.NETReactJS.NET
ReactJS.NET
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?
 
Angular Weekend
Angular WeekendAngular Weekend
Angular Weekend
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in Clojure
 
MEAN Stack Warm-up
MEAN Stack Warm-upMEAN Stack Warm-up
MEAN Stack Warm-up
 
The JavaScript You Wished You Knew
The JavaScript You Wished You KnewThe JavaScript You Wished You Knew
The JavaScript You Wished You Knew
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutes
 
Quick & Dirty & MEAN
Quick & Dirty & MEANQuick & Dirty & MEAN
Quick & Dirty & MEAN
 
A Quick Intro to ReactiveX
A Quick Intro to ReactiveXA Quick Intro to ReactiveX
A Quick Intro to ReactiveX
 

Dernier

Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 

Dernier (20)

Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 

Debugging and Tuning Mobile Web Sites with Modern Web Browsers

  • 1. Installation Files ! If you haven't already, be sure to download the installation files for Troy Miles' tutorial from here: ! ! http://10.35.0.2/velocity/
  • 2. Debugging and Tuning Mobile Web Sites with Modern Web Browsers 24 June 2014
  • 3. Me ! Troy Miles - Senior Software Engineer ! Kelley Blue Book, Irvine, CA ! @therockncoder ! rockncoder@gmail.com
  • 4. All of the materials ! Slides ! Links ! Notes ! https://bitly.com/bundles/rockncoder/4
  • 5. The Agenda ! The Mobile Web ! Debugging ! Performance Measuring & Improving ! Memory Leaks
  • 6. iPhone ! On-sale June 29, 2007 ! Initially the only way to write iPhone "apps" was via the web ! Introduced Mobile Safari browser ! Lots of mobile web features
  • 7. iPhone Mobile Web Features ! Viewport meta tag ! Startup image ! Hide browser UI ! Home screen icons ! No debugging features
  • 8. Android ! First phone HTC Dream aka G1 ! Released October 22, 2008 ! Like Safari it is Webkit based ! No debugging features
  • 9. Analogs ! All of the major mobile browsers have desktop cousins ! Android - Chrome ! iOS - Safari ! Windows Phone - IE
  • 10. Debugging ! Understanding the scope of the problem ! Debugging without a debugger ! What is weinre?
  • 11. Understanding the problem ! You can do a lot with analogs but you can't… ! Touch ! Render correctly ! Measure performance
  • 12. Debugging without a debugger ! alert() ! iPhone Developer Debug Console ! Proprietary solutions
  • 13. What is weinre? ! Created by Patrick Mueller ! Stands for WEb INspector REmote ! Like Firebug but only for Webkit based browser ! Designed to work remotely, good for mobile
  • 14. What does it give you? ! See HTML & CSS ! View the console ! View resources like local and session storage ! Network calls ! Performance measures
  • 15. Three main parts of weinre ! Debug Server ! Debug Client ! Debug Target
  • 16. How does it work? ! The debug client and target communicate via XHR with the server ! Both the debug target and client are written in JavaScript
  • 17. Installation & running ! For Windows, Mac OS X, and Linux based machines ! Delivered as a npm module ! sudo npm -g install weinre ! from the terminal - weinre ! weinre --boundHost -all- ! Or use an online host
  • 18. Why use an online host? ! You aren't a node user ! You have firewall issues ! You, like me, are lazy ! http://debug.build.phonegap.com/
  • 19. Multi-user Model ! Add a hash tag + id to the end both the client and target URLs ! Minimalistic security measure ! Still transmitted in the clear ! Can also add the id to a bookmarklet
  • 20. Using a bookmarklet ! It is easy to forget to remove the weinre script from a page ! You may not have access to the source code for a page ! It is not easy to get a bookmark onto a mobile device ! Remember: if you reload the page the injected script is gone!
  • 21. Adding a bookmarklet - Safari Edition ! Open Safari ! Go to your debug Server web page ! Scroll down to the bookmarklet textarea ! Tap and release the textarea to zoom it ! Tap it again until the magnifying glass appears ! Release it and the edit options should appear ! Tap Select All ! Tap Copy
  • 22. Adding a bookmarklet - Safari Edition ! Tap Done ! Tap the Share icon ! Tap the Bookmark icon ! Give your bookmarklet a name ! Tap Save ! Tap the Bookmark icon ! Find your saved bookmark ! Tap Edit in the lower right hand corner
  • 23. Adding a bookmarklet - Safari Edition ! Tap your bookmark ! Tap the URL line ! Tap the "x" to erase the URL ! Tap and release the Address line to make the Paste option appear ! Tap Paste ! Tap Done ! Tap Done again
  • 24. Adding a bookmarklet - Safari Edition ! Return to your debug page ! Find your bookmark and tap it
  • 25. Adding a bookmarklet - Chrome Edition ! Go to your debug server page ! Scroll down to the bookmarklet textarea ! Long press until the selectors appear ! Move the selectors to encompass the entire textarea ! Tap the copy icon ! Tap the favorite icon ! Erase the URL text ! Long press until PASTE appears
  • 26. Adding a bookmarklet - Chrome Edition ! Tap PASTE ! Rename bookmark if desired ! Tap Save ! Return to you debug page ! From the URL bar, begin typing the name of your bookmark ! When it appears in the list of suggestions, tap it
  • 27. Using weinre ! Remote ! Elements ! Resources ! Network ! Timeline ! Console
  • 28. Client/Target Colors ! blue - online but not active ! green - online and active ! red - disconnected about to disappear
  • 29. weinre summary ! Only webkit browsers ! No JavaScript debugging ! The target script is 151 KB ! The communication between client and target can be sluggish ! Not perfect, but better than alerts
  • 30. Opera Dragonfly ! The first browser to support remote debugging ! Had to use its mobile & desktop browser ! Like weinre communication via HTTP - no need to connect ! This has relegated their Dragonfly remote debugging obsolete ! Opera’s new browser supports remote debugging via Chrome Dev Tools
  • 31. Safari ! iOS gained remote debugging capabilities starting with iOS 6 and Safari 6 ! iOS 6 release September 2012 ! Only works with Apple devices iPhone, iPad, Mac OS X ! Devices must be connected via USB
  • 32. Safari iPhone Debugging Demo ! On iPhone, Settings -> Safari -> Advanced -> WebInspector, turn on ! From Safari, Preferences -> Advanced ! Click Show Develop menu in menu bar ! Using Apple approved cable connect iPhone to Mac ! On iPhone, use Safari to open a web page ! On Mac, Develop -> <your device name> -> <web page>
  • 33. Safari UI ! Resources ! Timeline ! Debugger ! Console / Inspect ! Styles ! Layers ! Node ! Resource
  • 34. Safari Caveats ! Remote debugging only works for iOS 6 or greater devices ! 9% of iOS devices on iOS 6 ! 89% of iOS devices on iOS 7 ! For the 2% on iOS 5 or below, use weinre
  • 35. Chrome ! Remote debugging introduced with Chrome for Android Beta ! Released in Early 2012 ! Initially required Android SDK and the Android Debug Bridge (ADB) ! Now included in Chrome, no need for Android SDK
  • 36. Chrome Nexus 4 Debugging Demo ! Preparing Android phone ! Settings -> About phone -> Build number, tap until it says you are a developer ! Settings -> Developer options -> USB debugging, select it ! In Chrome -> Hot dog icon -> Tools -> Inspect devices ! Check, Discover USB devices ! Connect Android device to computer via USB ! On Android phone, use Chrome to open a web page
  • 37. Chrome UI ! Inspect ! Elements ! Network ! Sources ! Timeline ! Profiles ! Resources ! Audits
  • 38. Chrome UI ! Console ! Show Console ! Show Settings ! Show Screen Cast
  • 39. Chrome Caveats ! Every Android device is different, your steps may vary ! Only for 4.0 and greater phones ! Use weinre for the rest
  • 40. Amazon Silk ! Silk is the browser used on the Kindle Fire and the Fire Phone ! Silk is Webkit based ! Can use weinre on it ! Can also remote debug with Chrome dev tools and the ADB
  • 41. How fast is 4G? ! No actual 4G standard ! Name for the standard is International Mobile Telecommunication Advanced ! The standard doesn't have minimum speeds ! Maxs moving speeds to 100 Mbps, and 1 Gbps for stationary ! Latency is high on both 3G and 4G networks averaging over 100ms across all carriers
  • 42. Throttling your website ! The basics of throttling ! Proxy phone through your development machine ! Throttle the speed of development machine ! For the Mac we use: ! an Xcode tool, Network Link Conditioner ! The free edition of Burp ! For the PC ! Fiddler ! A Fiddler extension, Connection Simulator
  • 43. Throttling via a Mac ! System Preferences -> Network Link Conditioner ! Select a Profile ! Turn on ! Launch Burp ! Proxy -> Options, Select the single proxy listener ! Click Edit, Click Binding tab, Click Specific address ! Choose your IP address ! Click OK
  • 44. Throttling via a PC ! In Fiddler, Go Tools -> Fiddler Options… ! Click the Connections tab ! Click Allow remote computers to connect ! In Fiddler, Click Bandwidth Simulation -> Configure… ! Select a Simulation Mode ! Select a Bandwidth Midpoint ! Click Apply
  • 45. Proxying an Android device ! Your device and dev box must be on the same network ! Settings -> Wi-Fi ! Long press Wi-Fi connection ! Tap Modify network ! Check Show advanced options ! Proxy, select Manual ! Enter IP address and Proxy port ! Tap Save
  • 46. Proxying an iOS device ! Settings -> Wi-Fi -> tap info icon ! Scroll to the bottom of the page ! Tap Manual ! Enter Server and Port ! Tap Wi-Fi
  • 47. Turning off caching via Chrome ! Caching is great ! It speeds up your site for return visitors ! But it covers up speed issue during development
  • 48. Turning off caching via Safari ! Developer -> Your iOS device -> Your web page ! Click Timelines ! Press command + shift + R to load with no cache ! Press command + R to load with caching
  • 49. Performance Measuring ! Timeline is the tab for performance measuring ! Can view the time three ways: - Events - Frames - Memory
  • 50. Intro to HTML Rendering ! DOM creation - web page parsed into a tree of nodes called the Document Object Model ! Render Tree creation - DOM is parsed into a tree of visible objects called the Render Tree ! Rendering - The render tree is goes through “layout”, all of the nodes defined in screen coordinates ! Painting - The render is traversed which each node sent to the UI
  • 51. What is a layer? ! A layer is a portion of the web page which has been converted into a texture and moved to the GPU ! This conversion is where the performance boost comes from ! Layers are not FREE - They use system and GPU memory - There is CPU overhead ! Remember: Compositing is cheap, repainting is expensive
  • 52. Performance Improving ! There are no hard and fast algorithms ! The performance tools will help, but you have to do the hard work ! My favorite is the continuous page repainting mode
  • 53. Rules of Thumb ! Prefer requestAnimFrame over setTimeout or setInterval ! Prefer CSS animation over JavaScript ! Be careful of mixing CSS reads and writes
  • 54. CSS Performance Hit ! Triggers Composite - opacity - webkit-transform ! Triggers Paint and Composite - color, background color, box-shadow ! Triggers Layout, Paint, and Composite - left, top - width, height - visibility
  • 55. Memory Leaks ! Intro to memory leaks ! Why its your fault? ! Determining that a leak exists ! Finding the cause of the leak
  • 56. Intro to memory leaks ! JavaScript uses reference counting to do garbage collection ! When an object has no one referencing it, it can be collected ! If two objects point to each other, they will never be collected ! It is easy to create a leaky JavaScript apps ! Leaks have always existed in JavaScript apps ! The only difference is that now JavaScript apps are persistent
  • 57. Why its your fault? ! In JavaScript we don’t think about memory leaks ! Even when we think we may have one, too hard to find ! Leaks often involve some object creation code which should have been checked better
  • 58. Determining that a leak exists ! Leaks take time to be apparent, sometimes a long time ! The main tools are the Timelines and Profiles tabs ! The timelines, memory display shows current memory usage ! The profiles heap snapshot and heap allocation can help you finger the culprit ! Make use of the collect garbage button
  • 59. Finding the cause of the leak ! The Profiles tab’s record heap allocation is your best friend ! It can help you determine which object is holding memory ! Determining who is hold a reference to it is up to you ! Beware of closures
  • 60. Summary ! weinre ! Safari and Chrome remote debugging ! Performance measuring and improving ! Memory leaks ! https://bitly.com/bundles/rockncoder/4 ! rockncoder@gmail.com