Safari浏览器对HTML5的支持

By | 2012年8月13日

Safari浏览器对HTML5的支持

Safari’s support for HTML5 audio and video elements, offline storage support, and other HTML5 features makes it easy for developers to deliver rich, interactive media experiences natively within the browser, without the need for proprietary technologies.

HTML5 Media Support

Websites can now deliver rich, interactive media as easily as they deliver images. Safari was the first browser to support HTML5 audio and video elements, which work without plug-ins and make it easy to deliver audio and video in Safari on OS X and iOS. HTML5 audio and video elements come with a rich scripting API for controlling media playback. Since these elements are just like any other HTML element, they can be styled and animated with CSS. Support for HTML5 timed text tracks makes it easy to add captions to your video, and HTML 5 media controllers make it possible to keep media elements in sync. View demo

Web Notifications

When a user has your website open, your notifications appear in the new Notification Center in Mountain Lion. Any extensions enabled in Safari can also send notifications.

HTML5 Offline Storage Support

Safari supports the latest HTML5 offline data storage features. Your application can store its information on the local machine using either a simple key/value-based data store, or a robust SQL database. The data is stored locally and persists across launches of Safari so your application doesn’t need a network connection to access the data, improving startup time and overall performance.

If you leverage HTML5 application cache technology, Safari can locally store all of the resources – such as HTML, CSS, JavaScript, image files, and audio or video files — that are needed to run your web application. This means that users can access and use your web application even when they don’t have an active connection to the internet. Your application is always available. When back online, Safari can update the application with the latest data, code, and resources from your servers. View demo

目前支持的HTML5标签

  • Safari for Mac and PC supports these HTML5 features:
  • HTML5 timed text tracks new
  • HTML5 media synchronization new
  • Web notifications new
  • Full screen for
  • Closed captions for
  • Geolocation
  • HTML5 AJAX history
  • EventSource
  • WebSocket
  • HTML5 Draggable attribute
  • HTML5 forms validation
  • HTML5
  • HTML5

  • HTML5

  • HTML5

  • HTML5

  • HTML5

  • HTML5

  • HTML5

  • HTML5 sandboxed
  • HTML5
  • HTML5
  • HTML5
  • HTML5 offline storage
  • Cross-origin resource sharing
  • HTML5
  • Web workers

发表评论