How to Remove Deprecated Web Features? Complete Guide (2026)

Saar Twito7 min read
Saar Twito
Saar TwitoFounder & SEO Engineer

Hi, I'm Saar - a software engineer, SEO specialist, and lecturer who loves building tools and teaching tech.

View author profile →

What Are Deprecated Web Features?

A deprecated web feature is an API, HTML element, or CSS property that browser vendors have officially marked for removal. Using one produces a console warning, may break in a future browser release, and fails the no-deprecated-apis best-practices audit. Common examples in 2026 include WebSQL (removed from Chrome in November 2024), Application Cache (removed in Chrome 95, October 2021), synchronous XHR on the main thread, the Battery Status API (removed for privacy), and HTML elements like <font>, <center>, and <marquee>.

Key Facts (TL;DR)

  • Best-practices audit ID: no-deprecated-apis — fails on any console-warned deprecation.
  • WebSQL was removed from Chrome 117 (September 2023) for non-secure contexts and fully in Chrome 119 (November 2024).
  • Application Cache (<html manifest>) was fully removed in Chrome 95 (October 2021).
  • Synchronous XHR on the main thread is deprecated; the spec disallows it during page unload.
  • The Battery Status API was removed from Chrome and Firefox for fingerprinting/privacy reasons.
  • Chrome DevTools Issues panel surfaces every deprecation with a direct link to the migration guide.

Common Deprecations: Reference Table

Deprecated featureReplacementStatus
WebSQL (openDatabase)IndexedDBRemoved from Chrome (Nov 2024)
Application Cache (<html manifest>)Service Worker + Cache StorageRemoved from Chrome 95 (Oct 2021)
Synchronous XHR (xhr.open(..., false))fetch() with async/awaitDeprecated; blocked during unload
document.write()DOM methods (append, insertAdjacentHTML)Blocked by Chrome on slow connections since 2017
Battery Status API (navigator.getBattery)None — removed for privacyRemoved from Firefox; restricted in Chrome
HTTP geolocationHTTPS-only geolocationHTTPS required since Chrome 50 (April 2016)
<keygen>WebCrypto APIRemoved from HTML standard in 2017
Web Components v0 (document.registerElement)v1 Custom Elements (customElements.define)Removed from Chrome 80 (Feb 2020)
<font>, <center>, <marquee>CSSObsolete; not in HTML standard
Mutation EventsMutationObserverScheduled for removal in Chrome (2025+)
escape() / unescape()encodeURIComponent() / decodeURIComponent()Deprecated in ECMAScript Annex B
String.prototype.substr()slice() or substring()Deprecated (Annex B)

How to Find Deprecations: Step by Step

  1. Open Chrome DevTools and switch to the Issues panel — every deprecation is listed with the file, line, and migration link.
  2. Run an automated audit and check the no-deprecated-apis result under Best Practices.
  3. Search the codebase for known patterns: openDatabase(, applicationCache, xhr.open(.*, false), document.write(, getBattery(, <keygen, <marquee.
  4. Cross-check browser support on caniuse.com for anything flagged.
  5. Audit third-party scripts — analytics and ad SDKs are common offenders.
  6. Configure ESLint with eslint-plugin-compat to fail builds on deprecated APIs.

Common Replacements in Code

WebSQL → IndexedDB

// Deprecated
const db = openDatabase('mydb', '1.0', 'My DB', 2 * 1024 * 1024);

// Modern: IndexedDB (use idb wrapper for ergonomics)
import { openDB } from 'idb';
const db = await openDB('mydb', 1, {
  upgrade(db) {
    db.createObjectStore('items', { keyPath: 'id' });
  },
});
await db.put('items', { id: 1, name: 'Hello' });

Synchronous XHR → fetch

// Deprecated: blocks the main thread
const xhr = new XMLHttpRequest();
xhr.open('GET', '/api/data', false); // sync
xhr.send();
const data = JSON.parse(xhr.responseText);

// Modern
const data = await fetch('/api/data').then(r => r.json());

document.write → DOM methods

// Deprecated; blocked on slow connections
document.write('<script src="vendor.js"></' + 'script>');

// Modern
const s = document.createElement('script');
s.src = 'vendor.js';
s.async = true;
document.head.append(s);

AppCache → Service Worker

// sw.js
self.addEventListener('install', (e) => {
  e.waitUntil(
    caches.open('v1').then((c) => c.addAll(['/', '/main.css', '/app.js']))
  );
});

self.addEventListener('fetch', (e) => {
  e.respondWith(caches.match(e.request).then((r) => r || fetch(e.request)));
});

Common Mistakes

  • Suppressing deprecation warnings in the console instead of fixing them.
  • Swapping substr for substring without checking that the second argument means "end index" in substring, not "length".
  • Replacing AppCache with a Service Worker that has no versioning, leaving users stuck on stale assets.
  • Keeping document.write for third-party tag injection — use async script tags or a tag manager instead.
  • Using navigator.userAgent sniffing as the migration path; prefer feature detection.
  • Removing vendor prefixes without checking that legacy iOS Safari does not still need -webkit- for a given property.

How to Test for Deprecations

  1. Open DevTools and watch the Issues panel during a full user flow.
  2. Run an automated audit with mobile emulation and check Best Practices > no-deprecated-apis.
  3. Run npx eslint --plugin compat . and fix every "deprecated" rule violation.
  4. Test in Chrome Canary — features removed in upcoming releases will already be gone.
  5. Subscribe to the Chrome Status deprecation feed for advance notice.

FAQ

What does the no-deprecated-apis audit check?

It listens for browser deprecation warnings during an automated audit run and fails when any deprecated API is called. The report links to the chromestatus.com entry for each one.

Was WebSQL really removed?

Yes. Chrome removed WebSQL from non-secure contexts in Chrome 117 (September 2023) and from secure contexts in Chrome 119 (November 2024). Firefox and Safari never shipped it. Use IndexedDB.

Why is synchronous XHR deprecated?

It blocks the main thread until the network request completes, which freezes the entire page. The spec already prohibits it during page unload, and the rest is on the deprecation track.

Is document.write completely banned?

Not banned, but Chrome blocks document.write from injecting cross-origin scripts on slow 2G connections, and it triggers a deprecation warning everywhere. Use DOM methods instead.

Why was the Battery Status API removed?

Battery level and charging status combined into a near-unique fingerprint that trackers used to identify users across origins. Firefox removed it; Chrome restricted it.

How long does the deprecation grace period last?

Chrome typically gives 12 to 18 months between the announcement and removal, communicated via Chrome Status, the Chrome blog, and Reverse Origin Trials.

Do deprecated features hurt SEO?

Indirectly. They fail the Best Practices audit and often coincide with broken functionality, which hurts user signals. They are not a direct ranking factor.

Does this affect AI search engines like ChatGPT and Perplexity?

Yes. AI crawlers run on modern headless browser engines that no longer ship deprecated APIs like WebSQL, AppCache, synchronous XHR, or document.write for cross-origin scripts. When your page depends on these, the AI bot may render an incomplete DOM — missing content, missing data, or a blank screen — so AI Overviews, ChatGPT, and Perplexity have nothing reliable to extract or cite.

Conclusion

Open the Chrome DevTools Issues panel, run an automated no-deprecated-apis audit, and replace every deprecated API in the reference table above. WebSQL, AppCache, synchronous XHR, document.write, and the Battery API are the highest-priority removals — each one is already gone or blocked in current Chrome and silently breaks pages that still depend on it. Run a Greadme deep scan to find deprecated API usage across your site.