PushManager.supportedContentEncodings

这是一个实验中的功能
此功能某些浏览器尚在开发中,请参考浏览器兼容性表格以得到在不同浏览器中适合使用的前缀。由于该功能对应的标准文档可能被重新修订,所以在未来版本的浏览器中该功能的语法和行为可能随之改变。

PushManager的只读方法 supportedContentEncodings 返回一组支持内容编码,可以用在加密信息中发送的消息。

语法

var encodings[] = PushManager.supportedContentEncodings

一个字符串数组

说明

说明 状态 注释
Push API
supportedContentEncodings
Working Draft 最初的定义

支持的浏览器

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
supportedContentEncodings
Experimental
Chrome Full support 60Edge Full support 16
Disabled
Full support 16
Disabled
Disabled From version 16: this feature is behind the Enable service workers preference.
Full support 17
Firefox Full support 44
Notes
Full support 44
Notes
Notes Service workers (and Push) have been disabled in the Firefox 45 and 52 Extended Support Releases (ESR.)
IE No support NoOpera Full support 47Safari No support NoWebView Android No support NoChrome Android Full support 60Firefox Android Full support 48
Notes
Full support 48
Notes
Notes Push enabled by default.
Opera Android Full support 44Safari iOS No support NoSamsung Internet Android Full support 4.0

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.