| CARVIEW |
Select Language
HTTP/2 302
x-cloud-trace-context: dddbbda52c329c8844a808604a2fc416
location: /en-US/docs/Web/API/IDBKeyRange/includes
via: 1.1 google, 1.1 varnish, 1.1 varnish, 1.1 varnish, 1.1 varnish
accept-ranges: bytes
cache-control: no-store
server: Google Frontend
content-type: text/plain; charset=utf-8
date: Mon, 29 Dec 2025 16:13:31 GMT
x-served-by: cache-bfi-kbfi7400118-BFI, cache-bfi-kbfi7400118-BFI, cache-sin-wsss1830035-SIN, cache-bom-vanm7210037-BOM
x-cache: MISS, MISS, MISS, MISS
x-cache-hits: 0, 0, 0, 0
x-timer: S1767024811.373917,VS0,VE327
vary: Accept
content-length: 62
HTTP/2 200
x-content-type-options: nosniff
cache-control: public, max-age=3600
via: 1.1 google, 1.1 varnish, 1.1 varnish, 1.1 varnish, 1.1 varnish
x-cloud-trace-context: 2e52eedf09c1bf5d839aa9a1e2b47955
server: Google Frontend
last-modified: Mon, 29 Dec 2025 01:08:25 GMT
referrer-policy: strict-origin-when-cross-origin
origin-trial: AxVILwizhbMjxFeHOn1P3R8niO1RJY/smaK4B4d1rLzc1gTaxtXMSaTi+FoigYgCw40uFRDwFcEAeqDR+vVLOW4AAABfeyJvcmlnaW4iOiJodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZyIsImZlYXR1cmUiOiJQcml2YXRlQXR0cmlidXRpb25WMiIsImV4cGlyeSI6MTc0MjA3OTYwMH0=
content-type: text/html
etag: "37acc1af0001d5184fbeba9992c9a3c9"
strict-transport-security: max-age=63072000
expires: Mon, 29 Dec 2025 17:07:55 GMT
x-goog-meta-goog-reserved-file-mtime: 1766969340
x-goog-storage-class: STANDARD
x-frame-options: DENY
x-goog-metageneration: 1
x-goog-hash: crc32c=3Td7VA==, md5=N6zBrwAB1RhPvrqZksmjyQ==
x-guploader-uploadid: AHVrFxP70azZMukiV2qGePDs5h1umjLJ1SogOGGTUJtJ6julIPjyKxHyu0pwGU2fVseztnkdzFfvihA
content-security-policy: default-src 'self'; script-src 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://*.googletagmanager.com assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; script-src-elem 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://*.googletagmanager.com assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; style-src 'report-sample' 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; connect-src 'self' developer.allizom.org bcd.developer.allizom.org bcd.developer.mozilla.org updates.developer.allizom.org updates.developer.mozilla.org https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://incoming.telemetry.mozilla.org https://observatory-api.mdn.allizom.net https://observatory-api.mdn.mozilla.net https://api.github.com/search/issues stats.g.doubleclick.net https://api.stripe.com; font-src 'self'; frame-src 'self' mdn.github.io *.mdnplay.dev *.mdnyalp.dev *.play.test.mdn.allizom.net https://v2.scrimba.com https://scrimba.com jsfiddle.net www.youtube-nocookie.com codepen.io survey.alchemer.com https://js.stripe.com; img-src 'self' data: *.githubusercontent.com *.googleusercontent.com *.gravatar.com mozillausercontent.com firefoxusercontent.com profile.stage.mozaws.net profile.accounts.firefox.com developer.mozilla.org mdn.dev wikipedia.org upload.wikimedia.org https://mdn.github.io/shared-assets/ https://mdn.dev/ https://*.google-analytics.com https://*.googletagmanager.com www.gstatic.com; manifest-src 'self'; media-src 'self' archive.org videos.cdn.mozilla.net https://mdn.github.io/shared-assets/; child-src 'self'; worker-src 'self';
x-goog-stored-content-encoding: identity
x-goog-generation: 1766970505288649
x-goog-stored-content-length: 142148
content-encoding: gzip
accept-ranges: bytes
age: 337
date: Mon, 29 Dec 2025 16:13:31 GMT
x-served-by: cache-bfi-krnt7300037-BFI, cache-bfi-krnt7300037-BFI, cache-sin-wsat1880023-SIN, cache-bom-vanm7210037-BOM
x-cache: MISS, HIT, MISS, MISS
x-cache-hits: 0, 1, 0, 0
x-timer: S1767024812.722541,VS0,VE218
vary: Accept-Encoding
content-length: 19139
IDBKeyRange: includes() method - Web APIs | MDN
Toggle sidebar
>
IDBKeyRange: includes() method
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
Note: This feature is available in Web Workers.
The includes() method of the IDBKeyRange
interface returns a boolean indicating whether a specified key is inside the key
range.
Syntax
js
includes(key)
Parameters
key-
The key you want to check for in your key range. This can be any type.
Return value
A boolean value.
Exceptions
DataErrorDOMException-
Thrown if the supplied key was not a valid key.
Examples
js
const keyRangeValue = IDBKeyRange.bound("A", "K", false, false);
keyRangeValue.includes("F");
// Returns true
keyRangeValue.includes("W");
// Returns false
Specifications
| Specification |
|---|
| Indexed Database API 3.0> # ref-for-dom-idbkeyrange-includes①> |
Browser compatibility
See also
- Using IndexedDB
- Starting transactions:
IDBDatabase - Using transactions:
IDBTransaction - Setting a range of keys:
IDBKeyRange - Retrieving and making changes to your data:
IDBObjectStore - Using cursors:
IDBCursor - Reference example: To-do Notifications (View the example live).