Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Window.isSecureContext

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.

The window.isSecureContext read-only property indicates whether a context is capable of using features that require secure contexts.

Syntax

var isSecure = window.isSecureContext

Examples

Feature detection

You can use feature detection to check whether they are in a secure context or not by using the isSecureContext boolean which is exposed on the global scope.

if (window.isSecureContext) {
  // Page is a secure context so service workers are now available
  navigator.serviceWorker.register("/offline-worker.js").then(function () {
    ...
  });
}

Specifications

Specification Status Comment
Secure Contexts Working Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes) 49 (49) ? ? ?
Feature Android Android Webview Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support (Yes) 49.0 (49) ? ? ? (Yes)

See also

문서 태그 및 공헌자

 이 페이지의 공헌자: Šime Vidas, fscholz, jonathanKingston, rolfedh, jpmedley
 최종 변경: Šime Vidas,