Avoid using deprecated, proprietary, or outdated code
The web is full of outdated or deprecated formats and web standards, and proprietary (non-standard custom) features that have been superseded. By adhering to up-to-date and widely recognized formats and web standards, developers can ensure better compatibility, user experience, and lower environmental impact.
Criteria: Preferred code
Avoid the use of deprecated, proprietary, or outdated formats and web standards. Always adopt up-to-date, widely recognized standards that offer equivalent or improved functionality. Such code may be used to meet a documented customer need only if there is a justifiable benefit that cannot otherwise be met (such as compatibility, accessibility, or emissions reduction). Also, don't serve polyfills to modern browsers.
Resources
- 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?
Impact: Low, Effort: Medium
GRI | Impact |
---|---|
materials | Low |
energy | Low |
water | Low |
emissions | Low |
Benefits of this guideline
- Environment: Deprecated standards will not be optimized or supported by future browsers, which could lead to broken functionality or a slow experience, wasting time and visitor resources.
- Security: Old code can potentially be exploited if security issues arise (and browsers stop supporting the features). Ensuring you maintain standards should be a part of your processes.
- Accessibility: Deprecated web standards often have poor support in assistive technologies, avoiding them will help to provide a semantic experience that works well for everyone.
- Performance: Modern web standards are highly optimized, avoiding deprecated or less efficient standards will increase the longevity of your product and reduce the need for a carbon-intensive redesign.
Example
-
code
-
content
Avoid using the now deprecated Cross Domain format unless you have an explicit requirement for it, as Flash is deprecated.
Tags:
- Accessibility
- Compatibility
- CSS
- HTML
- JavaScript
- Performance