• Skip to main content
  • Skip to search
  • Skip to select language
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. Web APIs
  3. BackgroundFetchRegistration
  4. BackgroundFetchRegistration.id

Table of contents

  • Value
  • Examples
  • Specifications
  • Browser compatibility

BackgroundFetchRegistration.id

The id read-only property of the BackgroundFetchRegistration interface returns a copy of the background fetch's ID.

Value

A string.

Examples

Logging the this part to the console returns the identifier set when registering the fetch. In this case, "my-fetch".

console.log(bgFetch.id); // "my-fetch"

Specifications

Specification
Background Fetch
# dom-backgroundfetchregistration-id

Browser compatibility

BCD tables only load in the browser

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Mar 23, 2022, by MDN contributors

Related Topics

  1. Background Fetch API
  2. BackgroundFetchRegistration
  3. Properties
    1. downloaded
    2. downloadTotal
    3. failureReason
    4. id
    5. recordsAvailable
    6. result
    7. uploaded
    8. uploadTotal
  4. Methods
    1. abort()
    2. match()
    3. matchAll()
  5. Events
    1. progress
  6. Inheritance:
    1. EventTarget
  7. Related pages for Background Fetch API
    1. BackgroundFetchEvent
    2. BackgroundFetchManager
    3. BackgroundFetchRecord
    4. BackgroundFetchUpdateUIEvent
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

  • MDN on Twitter
  • MDN on Github

Mozilla

  • Mozilla on Twitter
  • Mozilla on Instagram

© 2005-2022 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies