Best Practices Audits
These checks highlight opportunities to improve the overall code health of your web app.
- General best practices #
- Page lacks the HTML doctype, thus triggering quirks mode Learn how to make sure your page doesn't trigger quirks mode in older browsers.
- 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.
- Page lacks the HTML doctype, thus triggering quirks mode
- Make your page fast #
- Does not use HTTP/2 for all of its resources Learn why HTTP/2 is important for your page's load time and how to enable HTTP/2 on your server.
- 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.
- Does not use HTTP/2 for all of its resources
- Make your page secure #
- Links to cross-origin destinations are unsafe Learn how to safely link to resources on another host.
- Includes front-end JavaScript libraries with known security vulnerabilities Learn how to make your page more secure by replacing JavaScript libraries that have known vulnerabilities.
- Ensure CSP is effective against XSS attacks Learn about preventing cross-site scripting (XSS) attacks with a strict Content Security Policy (CSP).
- Links to cross-origin destinations are unsafe
- Create a good user experience #
- 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
- Avoid deprecated technologies #
- 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
- Diagnostic audits #
- Detected JavaScript libraries Learn about Lighthouse's diagnostic "Detected JavaScript libraries" audit.
- Detected JavaScript libraries