Home What Web Developers Should Know about Mobile Safari’s iOS 4.2 Update

What Web Developers Should Know about Mobile Safari’s iOS 4.2 Update

With the release of the iOS 4.2 update yesterday, the major focus was on all the new features iPad users would receive – folders, multitasking and a unified inbox, to name a few. It also offered two major new features for all iOS users (iPhone, iPad and iPod Touch) – AirPlay and AirPrint, the former for streaming content between Apple devices and the latter for printing from mobile devices to networked printers.

However, flying under the radar a bit, was an update to Apple’s mobile Safari browser. And for Web developers, this update may be the most important of all.

Web developers, especially those turning to HTML5 as the platform for building mobile applications, will be interested to learn that mobile Safari now includes several major changes regarding its support for HTML5 and W3C standards, including added WebSockets support, accelerometer support, new JavaScript data-types and better SVG support.

These features are just now being officiallydocumented by Apple, but Maximiliano Firtman, a mobile consultant and O’Reilly book author, detailed the changes on his blog prior to Apple’s release of its own documentation.

According to Firtman, he has detected the following changes:

  • Accelerometer & Gyroscope support through the DeviceOrientation API
  • WebSockets API from HTML5
  • Updated HTML5 Form Support
  • Partial XHR-2 Support
  • Print Support
  • New JavaScript data types
  • New DOM events
  • Enhanced SVG and Canvas support

The first item in that list – accelerometer and gyroscope support, is perhaps one of the most notable of all in terms of Web development. Until now, iOS Web developers didn’t have access to the accelerometer sensors or the magnetometer or gyroscope on some devices, writes Firtman. Now Apple is allowing access to both the accelerometer and the gyroscope APIs in iOS 4.2.

You can see an accelerometer demo in this video below (test yourself at ?http://ad.ag/wjmtgt):

Also, with support for WebSockets, developers of chat and other real-time applications can reduce AJAX periodic calls, explains Firtman, by using this W3C HTML5 API.

HTML5 form support has been updated, there are new supported DOM events and Canvas and SVG support has been improved, too.

Firtman’s post is filled with details on this and all the other new features Web developers will want to know about. It’s a must read (along with the official documentation of course) for all iOS developers.

(Via Mark Pilgram, John Gruber)

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.