Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
Since September 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
navigator.cookieEnabled は、クッキーが有効かどうかを示す論理値を返します。
このプロパティは読み取り専用です。
論理値です。
メモ: ブラウザーがサードパーティのクッキーをブロックするように構成されていた場合で、 navigator.cookieEnabled がサードパーティの iframe の中で呼び出された場合、 Safari, Edge Spartan, IE では true を返します (この場合にクッキーを設定しようとしても失敗するにもかかわらず)。 Firefox および Chromium ベースのブラウザーでは false を返します。
メモ: ウェブブラウザーは特定の場面で特定のクッキーを書き込むことを阻止することがあります。例えば、 Chrome ベースのブラウザーや、 Firefox の一部の実験的なバージョンでは、 SameSite=None 属性の付いたクッキーを作成することを許可しませんが、 HTTPS 上で生成され Secure 属性がある場合は例外です。
| HTML # dom-navigator-cookieenabled-dev |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年3月21日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.