Skip to Content

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.