Timing-Allow-Origin header


目录

The HTTP Timing-Allow-Origin response header specifies origins that are allowed to see values of attributes retrieved via features of the Resource Timing API that are otherwise restricted for cross-origin resources. Without it, the browser reports these values as zero, an empty string, or an empty array. For the list of affected properties, see Cross-origin restrictions in the PerformanceResourceTiming reference.

The browser checks this header on cross-origin responses: same-origin resources expose full timing information without it.

This header is independent of CORS. Passing the CORS check doesn't grant access to detailed timing information. Conversely, Timing-Allow-Origin doesn't expose properties that describe the response itself, such as its body size, content type, or status code.

Header type [Response header](https://developer.mozilla.org/en-US/docs/Glossary/Response%20header)

Syntax

Timing-Allow-Origin: *
Timing-Allow-Origin: <origin>, …, <originN>

Directives

Examples

Using Timing-Allow-Origin

To allow any resource to see timing resources:

Timing-Allow-Origin: *

To allow https://developer.mozilla.org to see timing resources, you can specify:

Timing-Allow-Origin: https://developer.mozilla.org

Specifications

Browser compatibility

See also


版本号 #3
由 壳壳虫 创建于 2026-10-31 03:27:53 UTC
由 cocobook-sync 更新于 2026-11-04 17:36:07 UTC