
SLON WordPress plugin

The SLON WordPress plugin helps prevent loading the same JavaScript multiple times, which can slow down your site and cause unexpected behavior. For example, a script that attaches an action to a button click may run multiple times instead of once.
This plugin gives you full control over how essential libraries like Bootstrap are loaded on your site. This ensures your site runs smoothly and avoids conflicts between scripts.
A few weeks ago, I wrote about the most common reasons for this problem:
- directly adding <script> tags in the <head>section,
- using outdated or poorly coded themes and plugins,
- registering scripts with different IDs in the wp_enqueue_script function.
This plugin demonstrates the SLON technology (Single Load ONly) (more about SLON technology). With it, you can control how Bootstrap is loaded on your site: from your site (plugin directory), from the official Bootstrap CDN, or not at all (useful if your theme already includes Bootstrap).
Example 1, Bootstrap loaded from MaxCDN:

Example 2, Bootstrap loaded from your own site (plugin directory):

Installation of SLON WordPress plugin
1. Upload the plugin files to the /wp-content/plugins/wa-slon-example directory;
2. Activate the plugin through the Plugins screen in WordPress;
3. Go to Tools -> SLON Example and choose how Bootstrap should be loaded.;
You can download the plugin for free from my blog or from GitHub.
Related posts:


Youtube Embed Performance – plugin for WP
Youtube Embed Performance will improve the performance of your initial page load, especially if there are two or more videos embedded on the same page. I think, it’s [...]
WordPress 5.0 – what’s new in this release
WordPress 5.0 named in honor of jazz musician Bebo, is available on December 6, 2018. You can download it or update in your WordPress dashboard. If you ignored all [...]