監査のベストプラクティス
これらを確認することにより、Web アプリのコードの健全性を全体的に向上させるために必要となる改善項目を浮き彫りにします。
- 一般的なベストプラクティス #
- ページに HTML Doctype が指定されていないため、Quirks モードがトリガーされる ページが古いブラウザで Quirks モードをトリガーしないようにする方法を学習します。
- Browser errors were logged to the console Learn how to identify and fix browser errors.
- Displays images with incorrect aspect ratio Learn how to display responsive images with the correct aspect ratio.
- ページに HTML Doctype が指定されていないため、Quirks モードがトリガーされる
- ページを高速化する #
- すべてのリソースにHTTP/2を使用していない ページの読み込み時間にHTTP/2が重要である理由と、サーバーでHTTP/2を有効にする方法。
- Uses document.write() Learn how to speed up your page's load time by avoiding document.write().
- Use passive listeners to improve scrolling performance Learn how to improve your page's scrolling responsiveness by avoiding passive event listeners.
- すべてのリソースにHTTP/2を使用していない
- ページのセキュリティを向上させる #
- 安全でないクロスオリジン宛先へのリンク 別のホスト上のリソースに安全にリンクする方法を学びます。
- 既知のセキュリティ脆弱性を持つフロントエンド JavaScript ライブラリが含まれる 既知の脆弱性が含まれる JavaScript ライブラリを置き換えることでページをより安全にする方法を学びます。
- Ensure CSP is effective against XSS attacks Learn about preventing cross-site scripting (XSS) attacks with a strict Content Security Policy (CSP).
- 安全でないクロスオリジン宛先へのリンク
- 優れたユーザーエクスペリエンスを作り上げる #
- Requests the geolocation permission on page load Learn how to responsibly request geolocation permission in a way that provides good user experience.
- Requests the notification permission on page load Learn how to responsibly request notification permission in a way that provides good user experience.
- Requests the geolocation permission on page load
- 非推奨の技術の使用を避ける #
- Uses Application Cache Learn how to migrate your web page from the deprecated Application Cache to the Cache API.
- Uses deprecated APIs Learn how to remove and replace deprecated APIs from your web page.
- Uses Application Cache
- 診断的監査 #
- Detected JavaScript libraries Learn about Lighthouse's diagnostic "Detected JavaScript libraries" audit.
- Detected JavaScript libraries