Content Index - Interactive Lab | IconVault
Real Content Index API lab: add, list and delete offline PWA content entries with honest support detection. Free, in-browser.
Content Index
Offline content entries for installed PWAs
New entry
checking…5 of 5 free entries left. Everything runs in your browser.
Indexed entries (0)
Detecting service worker and Content Index…
Operation log
add(), getAll() and delete() calls are logged here with their real results.
The real code
// Runs on a page controlled by your service worker (Chrome/Edge 84+, HTTPS)
const registration = await navigator.serviceWorker.ready;
await registration.index.add({
id: "article-123",
url: "/articles/123",
title: "My offline article",
description: "Available without a connection.",
icons: [{ src: "/icon-192.png", sizes: "192x192", type: "image/png" }],
category: "article",
});
const all = await registration.index.getAll(); // list entries
await registration.index.delete("article-123"); // remove one
// The browser surfaces indexed content in download UIs and,
// for installed PWAs, in OS-level content surfaces.About this tool
IconVault's Content Index playground talks to the real API: once a service worker with `registration.index` is detected, you can add entries with titles, descriptions, icons and categories, list them with `getAll()`, and delete them, all logged with genuine results. Where the API is missing, the form disables itself honestly and shows the exact code to run where it exists. It is free and runs fully in your browser.
The Content Index lets installed PWAs register their offline content, articles, videos, audio, with the browser so it can surface it in download managers and OS-level surfaces. The lab explains the requirements (Chrome/Edge 84+, HTTPS, an active service worker), the entry schema including icons and categories, and why this is the missing piece between cached assets and discoverable offline content.
Frequently asked questions
Popular searches
More tools
Algorithm Visualizer
Watch sorting and searching animate step by step
Alt Text Helper
Write better image alt text with live feedback
ARIA Reference
Searchable ARIA roles and attributes guide
Array Visualizer
Step through map, filter, reduce like a debugger
Coming soon
CLI
Coming soon
Figma plugin
Coming soon
VS Code extension
Coming soon
Chrome extension
Coming soon
AI icon generator
Coming soon
Team workspaces
Coming soon