What is Flying Scripts plugin?
Flying Scripts is a WordPress performance plugin developed by WP Speed Matters. Its purpose is simple: delay the loading and execution of JavaScript files until the user interacts with the page – through mouse movement, scroll, click, or touch. This reduces the amount of JavaScript that runs during initial page load, which directly improves Time to Interactive and Total Blocking Time scores in Core Web Vitals measurements.
The plugin works by replacing script src attributes with data-src attributes, preventing scripts from loading immediately. When user interaction is detected, the scripts load normally. This technique is called JavaScript delay or lazy loading of scripts.
Flying Scripts is most effective for reducing the impact of third-party scripts like live chat widgets, analytics trackers, social media embeds, and advertising scripts. These scripts often load large amounts of JavaScript that is not needed until the user actually interacts with those features.
Need Help With Flying Scripts Setup, Troubleshooting, or Customization?
Need help with Flying Scripts? Whether you are dealing with errors, broken functionality, styling problems, plugin conflicts, or advanced customization, we can help you fix the issue and get the plugin working properly on your WordPress site.
Get Flying Scripts Expert HelpKey Features
- Delay JavaScript loading until user interaction
- Keyword-based script identification for which scripts to delay
- Improves Time to Interactive and Total Blocking Time Core Web Vitals
- Works alongside WP Rocket, LiteSpeed Cache, and other caching plugins
- Lightweight plugin with no bloat
Pros & Cons
Pros
- Measurable improvement in Core Web Vitals TBT and TTI scores
- Free with no premium version needed
- Works well alongside other performance plugins
Cons
- Can break functionality if critical scripts are delayed
- Requires careful configuration to avoid delaying scripts that are needed on page load
Free vs Premium
Flying Scripts is completely free with no premium version. All functionality is included at no cost.
Common Problems & Fixes
After enabling Flying Scripts, certain functionality on my site has stopped working.
Flying Scripts delays scripts based on keywords you configure. If a script that is needed immediately on page load matches one of your delay keywords, it will be delayed and the functionality it provides will break until user interaction occurs. To fix this, identify which script is being delayed incorrectly and remove its identifier from the Flying Scripts keyword list. Common mistakes include delaying scripts that run form validation, navigation menus, or critical page interactions.
Flying Scripts is not improving my PageSpeed scores as expected.
Flying Scripts improves Time to Interactive and Total Blocking Time but does not directly affect Largest Contentful Paint or Cumulative Layout Shift. If those are your lowest scoring metrics, Flying Scripts will not help them. Also verify that the scripts you are delaying are actually contributing to your TBT score – use Chrome DevTools Performance tab to see which scripts are blocking the main thread during page load.
Live chat or contact widgets are not loading on my site after adding Flying Scripts.
Live chat widgets like Intercom, Drift, or Tidio are common scripts to delay with Flying Scripts. However, if you delay them completely, users will not see the chat widget until they move their mouse or scroll. This is usually acceptable behaviour since the chat only becomes relevant after the user is engaged. If the widget is not loading at all even after interaction, check that the keyword you are using matches the actual script source URL or inline script content.
Customization & Developer Notes
How do I configure Flying Scripts to delay specific third-party scripts?
Go to Settings, then Flying Scripts. In the script keywords field, enter words or strings that appear in the script src URLs you want to delay. For example, entering googletagmanager delays Google Tag Manager. Entering intercom delays Intercom chat scripts. Entering facebook delays Facebook Pixel. Each keyword on a new line or separated by commas. Test thoroughly after adding each keyword to ensure no critical functionality is broken.
Can I use Flying Scripts alongside WP Rocket or LiteSpeed Cache?
Yes. Flying Scripts complements caching and optimisation plugins. WP Rocket handles caching, CSS minification, and some JavaScript defer settings. Flying Scripts handles the delay until interaction pattern that WP Rocket does not do by default. Use Flying Scripts for third-party scripts that WP Rocket is not already optimising. Avoid delaying the same scripts with both plugins as this can cause conflicts.
Frequently Asked Questions
What is the difference between delaying scripts with Flying Scripts and deferring scripts with WP Rocket?
Deferred scripts load after the HTML parsing is complete but before the user interacts. Flying Scripts delays loading until the user actually interacts with the page – moves the mouse, scrolls, or clicks. This is a more aggressive approach that produces better Core Web Vitals scores but has a higher risk of breaking functionality if applied to the wrong scripts. Use defer for most scripts and delay with Flying Scripts for third-party scripts that are not needed immediately.
Will Flying Scripts affect my site analytics tracking?
If you delay Google Analytics or Google Tag Manager with Flying Scripts, users who leave the page without any interaction will not be tracked. This can reduce your reported traffic numbers and affect conversion tracking for passive visitors. For most sites this is acceptable since unengaged visitors have limited analytical value. If complete tracking is essential, do not delay your analytics scripts.
Is Flying Scripts safe for WooCommerce sites?
Use it carefully on WooCommerce sites. Do not delay WooCommerce scripts, payment gateway scripts, or any scripts that handle cart and checkout functionality. Delaying these can break add to cart buttons, cart updates, and checkout processes. Flying Scripts is safe for delaying non-essential scripts like social sharing widgets, review platform embeds, and analytics on WooCommerce pages.
Can Flying Scripts help my Google PageSpeed Insights score?
Yes, specifically the Time to Interactive and Total Blocking Time metrics. These are two of the six Core Web Vitals that contribute to PageSpeed Insights scores. By delaying non-critical JavaScript, you reduce the amount of script execution during the initial page load window, which improves those two metrics. The improvement depends on how much JavaScript you are currently loading on page load.