Delay JavaScript Execution


This option improves loading speed and performance by adding delay in loading of JavaScript files. Loading starts after the user interaction. This setting is available only in case one-click optimization with WP Super Cache has been activated.

You can enable/disable JS delay for the entire website in Theme Options → Performance → Caching & Minifying

or for separate pages/posts in Page Options:

If some JS files should be excluded from JavaScript delay (i.e. should load normally), you can use “Excluded JavaScript Files” text area to specify JavaScript files which should be excluded. You can use URLs or keywords, one per line, for example:

/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js

js-(before|after)

(?:/wp-content/|/wp-includes/)(.*)

Force delay on product pages

This option is available in case you run an online shop with WooCommerce. By default all product pages are excluded from scripts delay. If enabled, this setting will force scripts delay on all product pages increasing its performance. Please note: as product pages may contain different sets of variations, which loading requires different WooCommerce scripts, enabling this setting may cause layout shifts in products. Please check your product pages after enabling this setting.

Force delay on shop pages

This option is available in case you run an online shop with WooCommerce. By default all WooCommerce archive pages (main shop page, product categories etc.) are excluded from scripts delay. If enabled, this setting will force scripts delay on all WooCommerce archive pages increasing its performance. Please note: as WooCommerce archive pages may contain different sets of variations, which loading requires different scripts, enabling this setting may cause layout shifts in products grid. Please check your main shop page and product categories after enabling this setting.