iframeサンドボックス・許可属性ジェネレーターとは
iframeサンドボックス・許可属性ジェネレーターは、埋め込みタイプ別にサンドボックスフラグと許可属性を設定した安全なiframeマークアップを生成します。 出力は公開サイトに使う前に確認しやすい形で表示されます。
Quick answer
Use the sandbox attribute on iframes to restrict what the embedded content can do -- such as submitting forms, opening popups, or running scripts. Add allow values one at a time and only as needed.
Limitations
- The sandbox attribute does not protect against clickjacking on the parent page. Use a Content-Security-Policy with frame-ancestors for that.
- Some iframe features, such as storage access and top-level navigation, behave differently across browsers when sandbox is applied.
- Removing sandbox does not retroactively expose APIs -- the iframe must be reloaded for sandbox changes to take effect.
使い方
- 必要な値を入力します。
- 結果パネルの出力を確認します。
- ページに合う部分だけコピーします。
- 公開前にブラウザとホスティング環境で確認します。
主な用途
- 公開前の繰り返し作業を短くする。
- マークアップ、CSS、チェックリストを準備する。
- 静的サイトで見落としやすい小さなミスを減らす。