Skip to main content

Installation

To add the GLOW JS library to your website, include the following <script> tag in your HTML. This must be loaded before any other scripts that depend on the library.

<script src="https://glowfireworks.com/sdk/js/v1"></script>

When the script executes, it creates a single global variable: glow. Nothing else happens automatically – this variable serves as the entry point for all functionality.

Automatic Updates

The GLOW JS library is served from a CDN and automatically updates. This ensures your site is always ready to take advantage of new features and that patches are applied automatically. GLOW will never introduce breaking changes without a major version change, to allow for a manual and coordinated upgrade.

Performance Tips​

The GLOW library is small and is served from a CDN; as of version 1.7.0 it is 21 kB, compressed. Each unique version is cached indefinitely, and GLOW should barely impact your page loading performance. As such, the following advice is completely optional – but is useful if you'd like everything to load as quickly as physically possible with the absolute smallest impact on your site.

  • Place the GLOW <script> at the end of your <body> element to avoid render blocking and de-prioritize downloading until other on-screen elements like images have started loading. Just remember it must come before any script that uses it.
  • With the script at the end of the <body> the browser won't even attempt to connect to the GLOW CDN until it needs to, which adds some overhead on cold visits. Modern browsers can perform a DNS lookup and establish a TCP connection early and completely in the background to speed up future requests. To take advantage of this, add <link rel="preconnect" href="https://glowfireworks.com"> in the <head> of your pages that use the GLOW library.
Note

If these steps aren't easy to implement on your website, don't worry – GLOW works well no matter how you load it.

Browser Support​

All browsers from the past several years are supported, including Safari on iOS back to iOS version 12.5 (devices stuck on this are from 2015). We aim to support a wide range of devices and browsers, but as hardware and software age, the likelihood of issues beyond our control – especially with a GPU accelerated experience like GLOW – naturally increases.

We routinely test across Chrome, Firefox, Edge, and Safari on Windows/Mac OS, and Chrome, Firefox, and Safari on iOS/Android.

Next Steps​

Explore our guides for step-by-step instructions on common setups.

Need details on a specific function? Check out the API reference for in-depth documentation.