Skip to Content


Functionality for registering and communicating to the Nebula service worker.

JavaScript February 19, 2018


This function runs automatically, so it is not called manually. Is this incorrect?


Waiting for JavaScript to load...

Open this page in additional tab(s) to send a message between them:

Additional Notes

To install the Nebula Service Worker, find the sw.js file in the Nebula Child resources directory and move it to the root directory. Then, enable Service Worker in Nebula Options.

If you need to override the name and/or location of the file, override the sw_location() function (documentation here).

When using an SSL, Nebula sets a Content Security Policy (CSP) header to upgrade all http protocol requests to https.

This function is called from nebulaServiceWorkerInit() which either registers the service worker immediately (if it has been installed already) or waits for the user to scroll before installing (to prevent downloading all of the resources on initial page load).

Source File

Located in /assets/js/nebula.js on line 151.

Note: This function contains 51 to-do comments.


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

nebula.registerServiceWorker = function(){
    //Write your own code here, leave it blank, or return false.