Sec-CH-UA-Platform header
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Tiêu đề HTTP Sec-CH-UA-Platform request header là một gợi ý máy khách tác nhân người dùng cung cấp nền tảng hoặc hệ điều hành mà tác nhân người dùng đang chạy trên đó.
Ví dụ: "Windows" hoặc "Android".
Sec-CH-UA-Platform là một gợi ý entropy thấp.
Trừ khi bị chặn bởi chính sách quyền của tác nhân người dùng, nó được gửi theo mặc định (mà không cần máy chủ chọn tham gia bằng cách gửi Accept-CH).
| Loại tiêu đề | Request header, Client hint |
|---|---|
| Forbidden request header | Có (tiền tố Sec-) |
Cú pháp
Sec-CH-UA-Platform: <platform>
Chỉ thị
<platform>-
Một trong các chuỗi sau:
"Android","Chrome OS","Chromium OS","iOS","Linux","macOS","Windows", hoặc"Unknown".
Ví dụ
>Sử dụng Sec-CH-UA-Platform
Vì Sec-CH-UA-Platform là một gợi ý entropy thấp, nó thường được gửi trong tất cả các yêu cầu.
Trình duyệt chạy trên máy tính macOS có thể thêm tiêu đề sau vào tất cả các yêu cầu.
Sec-CH-UA-Platform: "macOS"
Đặc tả
| Specification |
|---|
| User-Agent Client Hints> # sec-ch-ua-platform> |
Tương thích trình duyệt
Xem thêm
- Client hints
- User-Agent Client Hints API
Accept-CH- HTTP Caching: Vary và tiêu đề
Vary - Improving user privacy and developer experience with User-Agent Client Hints (developer.chrome.com)