Skip to Content

nebulaAddToCache()

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

JavaScript January 5, 2019

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.

Source File

This function was not found in /assets/js/nebula.js. Please report this error.

Override

To override or disable this JavaScript function, simply redeclare it with the exact same function name.

JavaScript
function nebulaAddToCache(url){
    //Write your own code here, leave it blank, or return false.
}