Title: Delaying javascript not working properly
Last modified: November 14, 2024

---

# Delaying javascript not working properly

 *  Resolved [joelmellin](https://wordpress.org/support/users/joelmellin/)
 * (@joelmellin)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/)
 * Hi,
 * When we try to delay javascript we get at least these errors:
   1. When adding 
   a product to cart on a single product page and then go back to the archive page
   the minicart shows as empty. Even when clicking on the minicart shows zero products.
 * 2. Product images are not loading on the single product pages without cursor 
   move.
 * We have excluded javascript according to the following image:
 * [https://snipboard.io/b2PjSQ.jpg](https://snipboard.io/b2PjSQ.jpg)
   We have checked
   that it is not the theme or any other plugins causing the problem.
 * [https://xtemos.com/forums/topic/delaying-javascript-not-working-properly/](https://xtemos.com/forums/topic/delaying-javascript-not-working-properly/)
   
   [https://www.awesomescreenshot.com/video/32911748?key=2e9e78d36962f0ad862e1b9305c2de14](https://www.awesomescreenshot.com/video/32911748?key=2e9e78d36962f0ad862e1b9305c2de14)**
   From theme support:**
 * “_Hello,_
 * _In the video we can see that the same happens on the default Storefront theme,
   the delay functionality from LightSpeed affects the mini cart on the default 
   theme as well. _**_I suggest you contact the LightSpeed support team because 
   their “delayed” functionality works badly even on the default theme._“**
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdelaying-javascript-not-working-properly%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/page/2/?output_format=md)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18136258)
 * I remember woodmart theme has ajax update for cart ? that should load the cart
   content after page is load
 * alternatively , you can go to cache -> woocommerce -> enable “vary for mini cart”,
   then purge all
 * that’s exactly what JS delay do , js wont’ be executed until certain action like
   move cursor is detected , which exactly indicate the js delay is working
 * you probably want to say js delay excluding is not working , you may also need
   to exclude these keyword from js exclude as well
 *  Thread Starter [joelmellin](https://wordpress.org/support/users/joelmellin/)
 * (@joelmellin)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18136428)
 * Yes Woodmart uses AJAX. But when I try to use the delay javascript the cart is
   empty after going back from a single product page even if I added a product. 
   And this is the case also when I use a standard theme, not only Woodmart. When
   Javascript delay is activated the product is also added by page reload instead
   of AJAX.
 * I tried “go to cache -> woocommerce -> enable “vary for mini cart” , then purge
   all”, but it did not do any difference.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18136587)
 * a wild guess , try put `wd` and `wood` into JS exclude and JS defer/delay exclude,
   purge all , see how it goes
 *  Thread Starter [joelmellin](https://wordpress.org/support/users/joelmellin/)
 * (@joelmellin)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18136667)
 * It is closer to a solution now. The “wd” and “wood” made it to add by AJAX again
   instead of reloading the page when a product is added to cart. To use cache -
   > woocommerce -> enable “vary for mini cart” also made a change to the cart when
   going back from a single product page to the shop page in the way that it now
   shows what the cart contains:
 * [https://snipboard.io/Te4cDN.jpg](https://snipboard.io/Te4cDN.jpg)
 * Before it showed 0.
 * **However, when clicking on it, it shows still that it is empty.**
 * [https://snipboard.io/GAn3FZ.jpg](https://snipboard.io/GAn3FZ.jpg)
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18136683)
 * did you enable CSS minify ? if so , try disable it
 *  Thread Starter [joelmellin](https://wordpress.org/support/users/joelmellin/)
 * (@joelmellin)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18136796)
 * I tried to disable it, but no difference at all.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18143907)
 * okay , let’s try the old fashion way , what does it show if you disable all JS
   and CSS options ?
 * I assume it will work by then , after that , please re-enable them back one by
   one , see which one caused issue , we will see what to do next
 *  Thread Starter [joelmellin](https://wordpress.org/support/users/joelmellin/)
 * (@joelmellin)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18146772)
 * If we disable all JS and CSS options it is ok. After we re-enable them back one
   by one everything is ok until enabling the delaying of Javascript.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18147036)
 * please provide the report number , you can get it in toolbox -> report -> click“
   send to LiteSpeed”
 *  Thread Starter [joelmellin](https://wordpress.org/support/users/joelmellin/)
 * (@joelmellin)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18148199)
 * Report number: **GWOZGBVG**
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18149836)
 * try put these files mentioned by woodmart support, into BOTH JS exclude and JS
   defer exclude , purge all , see how it happens
 * if you can also ask them , if there is any inline JS involved, you may need to
   exclude inline JS as well.
 *  Thread Starter [joelmellin](https://wordpress.org/support/users/joelmellin/)
 * (@joelmellin)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18157516)
 * I tried to put the files mentioned by woodmart support, into BOTH JS exclude 
   and JS defer exclude, but no difference still. Waiting answer from Woodmart about
   if there is any inline JS involved.
 *  Thread Starter [joelmellin](https://wordpress.org/support/users/joelmellin/)
 * (@joelmellin)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18159001)
 * From Woodmart support:
 * _“All JS code in our theme can be found in the files. Only the custom js that
   you add to the Theme settings is displayed inline.”_
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/#post-18159008)
 * you mean they ask you or us to look over all of their files ?
 * for js files , it’s easy to find , but I think they do also use inline javascript,
   that’s the hard part to find out
 *  Thread Starter [joelmellin](https://wordpress.org/support/users/joelmellin/)
 * (@joelmellin)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/page/2/#post-18159519)
 * From Woodmart support:
   _“Hello,_
 * _Please recheck this video – [https://www.awesomescreenshot.com/video/32911748?key=2e9e78d36962f0ad862e1b9305c2de14](https://www.awesomescreenshot.com/video/32911748?key=2e9e78d36962f0ad862e1b9305c2de14)
   at 5 minutes of the video we can see the same issue happens on the default Storefront
   theme – [https://take.ms/frlcGb](https://take.ms/frlcGb) which is not using our
   JS files and etc. _
 * _First ask them to fix that problem on the default Storefront theme and only 
   after that recheck how it works with ours theme._
 * _Thank you for your time and patience._
 * _Kind Regards”_

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/page/2/?output_format=md)

The topic ‘Delaying javascript not working properly’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [joelmellin](https://wordpress.org/support/users/joelmellin/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/delaying-javascript-not-working-properly/page/2/#post-18164007)
 * Status: resolved