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 modeLearn how to make sure your page doesn't trigger quirks mode in older browsers.
- Browser errors were logged to the consoleLearn how to identify and fix browser errors.
- Displays images with incorrect aspect ratioLearn 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 resourcesLearn 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 performanceLearn 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 unsafeLearn how to safely link to resources on another host.
- Includes front-end JavaScript libraries with known security vulnerabilitiesLearn how to make your page more secure by replacing JavaScript libraries that have known vulnerabilities.
- Ensure CSP is effective against XSS attacksLearn 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 loadLearn how to responsibly request geolocation permission in a way that provides good user experience.
- Requests the notification permission on page loadLearn how to responsibly request notification permission in a way that provides good user experience.
- Prevents users from pasting into password fieldsLearn how to improve the user experience of your site's login screen by allowing users to paste text into password fields.
- Requests the geolocation permission on page load
- Avoid deprecated technologies #
- Uses Application CacheLearn how to migrate your web page from the deprecated Application Cache to the Cache API.
- Uses deprecated APIsLearn how to remove and replace deprecated APIs from your web page.
- Uses Application Cache
- Diagnostic audits #
- Detected JavaScript librariesLearn about Lighthouse's diagnostic "Detected JavaScript libraries" audit.
- Detected JavaScript libraries