--- title: Timing-Allow-Origin slug: Web/HTTP/Headers/Timing-Allow-Origin translation_of: Web/HTTP/Headers/Timing-Allow-Origin ---
响应头Timing-Allow-Origin
用于指定特定站点,以允许其访问Resource Timing API提供的相关信息,否则这些信息会由于跨源限制将被报告为零
Header type | {{Glossary("Response header")}} |
---|---|
{{Glossary("Forbidden header name")}} | no |
Timing-Allow-Origin: * Timing-Allow-Origin: <origin>[, <origin>]*
*
”作为通配符,从而允许所有域都具有访问定时信息的权限。如需允许任何资源都可以看到的计时(timing)信息,你可以如此设置:
Timing-Allow-Origin: *
如需允许https://developer.mozilla.org
查看你的计时信息,你可以设置:
Timing-Allow-Origin: https://developer.mozilla.org
Specification | Status | Comment |
---|---|---|
{{SpecName('Resource Timing 3', '#timing-allow-origin', 'Timing-Allow-Origin')}} | {{Spec2("Resource Timing 3")}} | Initial definition. |
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
{{Compat("http.headers.Timing-Allow-Origin")}}