3.20 Avoid Using Deprecated or Proprietary Code
The Web is full of dead, often proprietary code, created using standards that have been superseded or by groups that aren’t recognized. By following recognized coding standards, you ensure that your code will be rendered properly by browsers (and reduce the potential for added emissions occurring from unmaintained rendering processes).
Criteria
- Deprecated Code: Exclude deprecated formats and standards, the only exception being if consumer support demands maintaining older standards to provide a functional product.
- Outdated Code: Don’t use an older standard if a newer recommendation will do the same job as / or more effectively.
Impact
Low
Effort
Medium
Benefits
- Environmental:
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.
GRI
- materials: Low
- energy: Low
- water: Low
- emissions: Low
Example
- Code:
<?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <site-control permitted-cross-domain-policies="none"/> </cross-domain-policy>
- Avoid using the now deprecated Cross Domain format unless you have an explicit requirement for it, as Flash is deprecated.
Resources
- DevOps tech: Code maintainability
- [GPFEDS] 1.9 – Strategy (Interoperable Technologies) (PDF)
- [GPFEDS] 2.9 – Specifications (Off-The-Shelf Components) (PDF)
- [GPFEDS] 4.5 – UX and UI (Native Components) (PDF)
- [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
- Use JSON for data exchange
- Website Maintenance Tips for Front-End Developers
- Why Do Some HTML Elements Become Deprecated?