Preface 1. The Mobile Jungle The Mobile Ecosystem What Is a Mobile Device? Mobile Device Categories Brands, Models, and Platforms Apple iOS Android Windows Nokia BlackBerry Samsung Sony Mobile Motorola Mobililty Amazon LG Mobile HTC HP and Palm Firefox OS Ubuntu for Phones Chinese Platforms Other Platforms Smart TV Platforms Technical Information
2. Understanding the Mobile Web Myths of the Mobile Web It's Not the Mobile Web; It's Just the Web! You Don't Need to Do Anything Special About Your Desktop Website One Website Should Work for All Devices (Desktop, Mobile, TV) lust Create an HTML File with a Width of 320 Pixels, and You Have a Mobile Website Native Mobile Applications Will Kill the Mobile Web People Are Not Using Their Mobile Browsers What Is the Mobile Web? Differences Mobile Web Eras WAP 1 WAP 2.0 The Mobile Browsing Experience Navigation Methods Zoom Experience Reflow Layout Engines Direct Versus Cloud-Based Browsers Multipage Experience Web Engines Fragmentation Display Input Methods Other Features Market Statistics
3. Browsers and Web Platforms Web Platforms That Are Not Browsers HTML5 Web Apps Web Views Pseudo-Browsers Native Web Apps, Packaged Apps, and Hybrids Ebooks Mobile Browsers Preinstalled Browsers User-Installable Browsers Browser Overview
4. Tools for Mobile Web Development Working with Code Adobe Dreamweaver Adobe Edge Tools Microsoft Visual Studio and WebMatrix Eclipse Native Web IDEs Testing Emulators and Simulators Real Device Testing Remote Labs Production Environment Web Hosting Domain Error Management Statistics
5. Arehitecture and Design Mobile Strategy When to Get Out of the Browser Context Server-Side Adaptation Progressive Enhancement Responsive Web Design RESS Navigation Design and User Experience Touch Design Patterns Tablet Patterns Official UI Guidelines What Not to Do
6. Markups and Standards First, the Very Old Ones WML Current Standards Politics of the Mobile Web Delivering Markup XHTML Mobile Profile and Basic Available Tags Official Noncompatible Features Creating Our First Compatible Template Markup Additions Mobile HTML5 Creating Our First HTML5 Template Syntax Rules New Elements CSS for Mobile WCSS Extensions CSS3 HTML5 Compatibility Levels Testing Your Browser
7. Basics of Mobile HTML5 The Document Head Title Website Icons Home Screen Icons The Viewport Changing the Navigation Method Removing Automatic Links Metadata for Sharing Hiding the URL Address Bar Native App Integration The Document Body Main Structure HTML5 Mobile Boilerplate The Content Block Elements Lists Tables Frames Links Accessibility
8. HTML5 Forms Form Design Form Elements Select Lists Radio Buttons and Checkboxes Buttons Hidden Fields Text Input Fields Range Slider Fields Date Input Fields File Selection Fields Noninteractive Form Elements Form Control Attributes Placeholder autofocus …… 9. Feature and Device Detection 10. Imaqesand Media 11. CSS for Mobile Browsers 12. JavaScript Mobile 13. Offline Apps, Storage, and Networks 14. Geolocation and Maps 15. Device Interaction 16. Native and Installed Web Apps 17. Content Delivery 18. Debuqqing and Performance 19. Distribution and Social Web 2.0 A. MIME Types for Mobile Content Index
Java Script Object Notation (best known as JSON) is a lightweight data interchange for-mat known to be compatible with almost every language in common use. It is sometimesused in JavaScript as a replacement for other transport formats,like XML.JSON can be used in Ajax requests or to store and load information on the client side.ECMAScript 5 includes a native JSON object that is also included in other older brows-ers. This object allows us to convert standard objects,arrays,and JavaScript variablesto a string JSON format using JSON. stringify() and to convert JSON string files toobjects again using JSON. parse(). Most modern smartphone and tablet browsers support this object directly,and for olderdevices we can use a JavaScript polyfill (https://github.corn/douglascrockford/JSON-js). Binary Data Because of the need for binary data in WebGL-the 3D canvas-modern browsers in-clude a way to manage binary data efficiently,known as typed arrays. Even non-WebGLbrowsers,such as Safari on iOS,support these type extensions. The list of possible typesincludes DataVtew,ArrayBuffer,Float32Array,Int32ArFay,and Uint8AFray. Typedarrays work pretty much the same as normal JavaScript arrays,but their execution ismuch fastenWe can use these new data types with the Canvas,WebGL,XHR2,Workers,Sockets,and File API,as we will see later in this book. Web Workers Web Workers (http://www.w3.org/TR/workers) is a W3C specification that allows Java-Script to create working threads instead of executing all the code in the main UI thread,shared with the browser's rendering engine.The specification defines two kinds of workers: workers and shared workers. Creating aworker allows a script to create an isolated thread that can communicate bidirectionallywith the opener script and it has its own isolated context. A shared worker can beaccessed by different scripts in the same domain that are working in different contexts,such as different tabs,windows,or iframes. Using the idea of ports,the shared workercan communicate with different executing scripts at the same time. ……