best-practices
Modern web development standards covering security, compatibility, and code quality patterns.
- Enforces HTTPS, Content Security Policy, and security headers to prevent XSS, clickjacking, and mixed-content vulnerabilities
- Addresses browser compatibility through proper doctype, charset, viewport configuration, and feature detection instead of user-agent sniffing
- Covers deprecated APIs (document.write, synchronous XHR, Application Cache) with modern replacements (dynamic script loading, fetch, Service Workers)
- Includes code quality checks: valid HTML, semantic markup, error handling, memory cleanup, and passive event listeners for performance
- Provides an audit checklist and tools (npm audit, SecurityHeaders.com, W3C Validator, Lighthouse) for systematic best-practices validation
Best practices
Modern web development standards based on Lighthouse best practices audits. Covers security, browser compatibility, and code quality patterns.
Security
HTTPS everywhere
Enforce HTTPS:
<!-- ❌ Mixed content -->
<img src="http://example.com/image.jpg">
<script src="http://cdn.example.com/script.js"></script>
<!-- ✅ HTTPS only -->
<img src="https://example.com/image.jpg">
<script src="https://cdn.example.com/script.js"></script>
More from addyosmani/web-quality-skills
accessibility
Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".
21.9Kseo
Optimize for search engine visibility and ranking. Use when asked to "improve SEO", "optimize for search", "fix meta tags", "add structured data", "sitemap optimization", or "search engine optimization".
21.2Kperformance
Optimize web performance for faster loading and better user experience. Use when asked to "speed up my site", "optimize performance", "reduce load time", "fix slow loading", "improve page speed", or "performance audit".
12.3Kcore-web-vitals
Optimize Core Web Vitals (LCP, INP, CLS) for better page experience and search ranking. Use when asked to "improve Core Web Vitals", "fix LCP", "reduce CLS", "optimize INP", "page experience optimization", or "fix layout shifts".
6.5Kweb-quality-audit
Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".
6.3K