Features restricted to secure contexts - Web security 编辑

This reference lists the web platform features available only in secure contexts — see Secure Contexts for a definition and more details.

Current features available only in secure contexts

This section lists all the APIs available only in secure contexts, along with browser versions the limitation was introduced in, as appropriate.

Note: Only the browsers that actually support secure contexts are listed in this document. See here for information on secure contexts support.

APIChrome/OperaEdgeSafariFirefox
Async Clipboard API66Not supportedNot supported63
Background Sync (see SyncManager, for example)49Not supportedNot supportedNot supported
Cache-Control: immutableNot supported151149
Credential Management API51Not supportedNot supportedNot supported
Generic Sensor API67Not supportedNot supportedNot supported
Payment Request API (and Basic Card Payment).611511.1In development (behind the dom.payments.request.enabled pref).
Push API4217Not supported44
Reporting APISupportedNot supportedNot supportedBehind flag since Fx 65
Service Workers401711.144
Storage API55Not supportedNot supported51
Web Authentication API65In preview (17)In development60
Web Bluetooth56Not supportedNot supportedNot supported
Web MIDI (see MIDIAccess, for example)43Not supportedNot supportedNot supported
Web Crypto API6079Not supported75

Secure context restrictions that vary by browser

Some browsers may decide to disable certain APIs in non-secure contexts or apply other restrictions/security measures, despite the spec not requiring them. This section lists any such differences existing in browsers.

APIChromeEdgeSafariFirefox
Application CacheRestricted to secure contexts from Chrome 70 (complete removal planned for Chrome 90).Restricted to secure contexts from Edge 79 (removal planned for Edge 90).public interest on deprecation WebKit bug 182442Restricted to secure contexts in Firefox 62 (complete removal from Firefox 84).
GeolocationRestricted to secure contexts in 50Restricted to secure contexts in 10Restricted to secure contexts in 55
Device Orientation / Device MotionDeprecation warningDeprecation warnings since 60. Note that these apply to secure contexts as well.
Encrypted Media ExtensionsRestricted to secure contexts in 58Planned.
getUserMedia()Restricted to secure contexts in Chrome 47Temporary access available only (users cannot choose "Remember this decision" in the permission request dialog).

Restricted to secure contexts in Firefox 68.
NotificationsRestricted to secure contexts in Chrome 62Restricted to secure contexts in Firefox 67.
<a ping> attributeDisabled in non-secure contextsSupport has been added since Firefox 3, but never been enabled by default (behind the browser.send_pings pref).
PresentationDeprecation warning in 61
Web Crypto APIHas been restricted to HTTPS since early days (API was visible in HTTP as well but operations failed). Restricted to secure contexts in Chrome 60 (API is no longer visible on non-secure contexts).Restricted to secure contexts from Edge 79Restricted to secure contexts in Firefox 75
registerProtocolHandler()Restricted to secure contexts in Firefox 62.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:46 次

字数:9916

最后编辑:8 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文