How to Use Toast v3: A Promise-Based JSCSS Loader

Aug 7, 2024 | Programming

Welcome to the ultimate guide on Toast v3, a powerful promise-based JSCSS loader designed to optimize your website’s performance by loading assets asynchronously. In this blog, we will walk through setting it up, working with its API, and troubleshooting common issues!

Quick Note on Browser Support

Before we dive into the specifics, it’s crucial to note that support for Internet Explorer 9 and 10 has been dropped. Due to the decline in market share and the lack of support from Microsoft, these browsers will not be receiving updates. If you’re still using any version prior to IE 11, be aware that while Toast 3.0.2 may work, it is not recommended for future-proofing your projects.

Compatibility List

Toast has been verified to work on the following browsers:

  • Chrome 83 (and earlier versions)
  • Firefox 76 (and earlier versions)
  • Edge 83 (and earlier versions)
  • Safari 11-13
  • IE 11
  • Android 4.4-10
  • iOS 10-13

Setting Up Toast

To get started, the preferred method for loading Toast into your project is through NPM or Yarn. Here’s how you can set it up:

npm install toast-loader

Once installed, you have various options for loading it depending on your application environment:

  • Inline in a `