哪些浏览器支持<脚本异步="异步" /&GT ;? [英] Which browsers support <script async="async" />?

查看:127
本文介绍了哪些浏览器支持<脚本异步="异步" /&GT ;?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

2009年12月1日,谷歌宣布了<支持href=\"http://google$c$c.blogspot.com/2009/12/google-analytics-launches-asynchronous.html\">asynchronous谷歌Analytics跟踪。

On December 1, 2009, Google announced support for asynchronous Google Analytics tracking.

异步跟踪使用异步指令实现了&LT;脚本方式&gt; 标签

The asynchronous tracking is achieved using the async directive for the <script> tag.

哪些浏览器支持异步指令(&LT;脚本异步=异步/&GT; )?既然哪个版本

Which browsers support the async directive (<script async="async" />) and since which version?

推荐答案

作为谷歌指定的异步支持使用两个部分来实现的:

The async support as specified by google is achieved using two parts:


  • 使用脚本您的网页上(脚本是由谷歌提供)写出A&LT;脚本&GT;标记到DOM。

  • using script on your page (the script is supplied by google) to write out a <script> tag to the DOM.

这脚本有异步=true属性来通知兼容的浏览器,它可以继续呈现网页。

that script has async="true" attribute to signal to compatible browsers that it can continue rendering the page.

第一部分在浏览器上运行,而不支持&LT;脚本异步.. 标签,让他们有黑客(异步加载虽然pretty坚实的),并且还允许渲染页面,而无需等待被检索的ga.js。

The first part works on browsers without support for <script async.. tags, allowing them to load async with a "hack" (although a pretty solid one), and also allows rendering the page without waiting for ga.js to be retrieved.

第二部分只影响兼容的浏览器能够理解异步的 HTML属性

The second part only affects compatible browsers that understand the async html attribute


  • FF 3.6 +

  • FF为Android所有版本

  • IE 10+(从preVIEW 2)

  • 铬8+

  • Android版Chrome所有版本

  • Safari浏览器5.0 +

  • iOS的Safari浏览器5.0 +

  • Android浏览器3.0+(最多蜂巢)

  • 歌剧15.0 +

  • 的Opera Mobile 16.0 +

  • 的Opera Mini的的(如8.0)

  • FF 3.6+
  • FF for Android All Versions
  • IE 10+ (starting with preview 2)
  • Chrome 8+
  • Chrome For Android All versions
  • Safari 5.0+
  • iOS Safari 5.0+
  • Android Browser 3.0+ (honeycomb on up)
  • Opera 15.0+
  • Opera Mobile 16.0+
  • Opera Mini None (as of 8.0)

在HTML5正确的方式来指定异步是一个&LT;脚本异步SRC =...,而不是&LT;脚本异步=真正的。然而,最初的浏览器不支持此语法,也没有支持设置上引用的元素的脚本属性。如果你想要这个,列表的变化:

The "html5 proper" way to specify async is with a <script async src="...", not <script async="true". However, initially browsers did not support this syntax, nor did they support setting the script property on referenced elements. If you want this, the list changes:


  • FF 4 +

  • IE 10+(preVIEW 2及以上)

  • 铬12 +

  • Android版Chrome 32 +

  • 的Safari 5.1 +

  • 没有一款Android版本

这篇关于哪些浏览器支持&LT;脚本异步=&QUOT;异步&QUOT; /&GT ;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆