Skip to Content
Menu

Deprecated

addToCache()

Add a resource to the cache using the Cache API or prefetch with a resource hint.

JavaScript February 7, 2021

Deprecated

Usage

JavaScript
nebulaAddToCache(url)

Parameters

url
(Required) (String) The URL of the resource to add to the cache
Default: None

Request or provide clarification »

Additional Notes

This is a convenient way to use the Cache API because it checks for invalid URLs to prevent them from attempting to be added to the cache. It also manages the cache name automatically to match the Service Worker JavaScript.

Deprecated in favor of Workbox.

Was this page helpful? Yes No


    A feedback message is required to submit this form.

    Please check that you have entered a valid email address.

    Enter your email address if you would like a response.

    Thank you for your feedback!