3.18 Avoid using deprecated, proprietary, or outdated code
Stick to the latest version of language specifications when coding unless you have a documented need to do otherwise.
Criteria
- Preferred code: Machine-testable
Avoid using deprecated, proprietary, or outdated formats and web standards. Always adopt up-to-date, widely recognized standards. Only use deprecated, proprietary, or outdated code where this is required to meet a documented customer need and if there is a justifiable benefit that cannot otherwise be met. Justifiable reasons could include compatibility with essential legacy systems and/or hardware, accessibility, or emissions reduction. Use polyfills only when necessary, and regularly audit code to see if they can be removed- Avoid serving legacy JavaScript to modern browsers
- Deprecated HTML elements (and what to use instead)
- DevOps tech: Code maintainability
- GPF – General Policy Framework (PDF) – 1.9 – Strategy (Interoperable Technologies)
- GPF – General Policy Framework (PDF) – 2.9 – Specifications (Off-The-Shelf Components)
- GPF – General Policy Framework (PDF) – 4.5 – UX and UI (Native Components)
- GR491 – 1-5005 – Proven Development Standards
- HTML5 Security Cheat Sheet
- JSON vs XML: which one is faster and more efficient?
- Maintainability Guide
- marquee elements are deprecated and must not be used
- The Carbon Impact of Web Standards (PDF)
- The Compact Guide to Web Maintainability: 200 Tips and Resources
- The history of deprecated and changed HTML tags
- The Neverending Story
- Thou Shalt Not Depend on Me (PDF)
- Use JSON for data exchange
- Website Maintenance Tips for Front-End Developers
- Why Do Some HTML Elements Become Deprecated?
Benefits
- Accessibility
Using modern web standards helps to ensure better support in assistive technologies. - Environment
Avoiding deprecated standards ensures your code is optimized for and supported by modern browsers, ensuring full functionality and a smooth experience. This helps to reduce browsing time and associated energy use. - Performance
Moving on from deprecated or less efficient standards increases the longevity of your digital product or service and reduces the need for a carbon-intensive redesign. - Security
Keeping up with modern standards reduces the risk of security exploits.
GRI
- Materials: Low
- Energy: Low
- Water: Low
- Emissions: Low