Home > iphonehacks > iOS 4.2 Brings Accelerometer & WebSockets Support To Mobile Safari

iOS 4.2 Brings Accelerometer & WebSockets Support To Mobile Safari

November 24th, 2010 11:22 admin Leave a comment Go to comments

New Web standard support in iOS 4.2

Ever since they fell out with Adobe, Apple has been actively advocating the use of HTML5 and other open web standards among the developer community. The company is learned to have formed a “creative technology group” that has been building interactive content with these tools.

In June this year, Apple launched a new section on their website that showcased the capabilities of such web standards to users. 

With the roll out of iOS 4.2.1, Apple has now gone a step ahead in showcasing the power of such standards. The latest version of Mobile Safari will give web developers access to support for new features like accelerometer and WebSockets that could enhance the web browsing experience for users. 

While iOS devices have had accelerometer sensors all along, these technologies were not available to developers until now. The newly released DeviceOrientation API will help developers build websites that can make use of information pulled from the iPhone’s accelerometer and gyroscope. Also, the support for WebSockets will optimise the server interaction capabilities for chat and real-time applications. Besides these, the latest version of iOS offer new JavaScript data-types, better SVG and HTML5 Form support. The availability of these features will allow developers to offer additional features to users when they access a website over an iOS-based device. 

To demonstrate a scenario, developer Maximiliano Firtman has published a webpage titled ‘Move the Ball‘. Clicking on this link from an iOS 4.2 powered device will display a virtual ball that will move based on the orientation of the device. However, visiting this web page from any other platform will display a message that reads:

Your browser does not support Device Orientation and Motion API. Try this sample with iPhone, iPod or iPad with iOS 4.2+“.

Firtman has noted that this demonstration was developed using JavaScript and CSS3. Check out a video demo of the link embedded below. 

Of course, this is just one simple demonstration and it will be interesting to see how developers make use of these new features to enhance the internet browsing experience on the iPhone, iPad and iPod Touch. How do you think such features will help iOS users? Do you see these technologies rendering Flash plugins redundant in future? Please share your opinion in the comments below. 

[via Apple Insider, MobileXWeb]

Source: iOS 4.2 Brings Accelerometer & WebSockets Support To Mobile Safari

Related Articles:

  1. RestoreTab For Safari: Jailbreak Tweak Reopens Closed Tabs In Mobile Safari
  2. Google Apps To Pull Support For Firefox 3.5, Internet Explorer 7, And Safari 3
  3. Safari UniBar: Jailbreak Tweak Unifies Address And Search Bar In Mobile Safari Like Google Chrome’s OmniBar
  4. Apple Disputes Browser Speed Findings, Says Mobile Safari’s the True Contender
  5. Browser Speed Test – Mobile Safari Vs Internet Explorer 9 Mobile Vs Android Browser
blog comments powered by Disqus