Title: Scroll Doesn&#8217;t Work When JavaScript Optimization is Set to Delayed
Last modified: May 3, 2022

---

# Scroll Doesn’t Work When JavaScript Optimization is Set to Delayed

 *  Resolved [essaund](https://wordpress.org/support/users/essaund/)
 * (@essaund)
 * [4 years ago](https://wordpress.org/support/topic/scroll-doesnt-work-when-javascript-optimization-is-set-to-delayed/)
 * Hello Malihu
 * Thanks for creating such a great plugin.
 * Now, the plugin works great but I have encountered an issue when optimizing JavaScript
   using a Cache plugin.
 * When set to Async or Deferred it works great. But When I set JavaScript to Delayed,
   the jump to scroll effect doesn’t work.
 * Can you troubleshoot for me and tell me what to do with JS delayed activated (
   or what JS should I exclude from delaying if the former is not possible)?
 * [https://i.imgur.com/ylTQdNF.png](https://i.imgur.com/ylTQdNF.png) (Please don’t
   post website link in the forum)
 * Regards
    -  This topic was modified 4 years ago by [essaund](https://wordpress.org/support/users/essaund/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [malihu](https://wordpress.org/support/users/malihu/)
 * (@malihu)
 * [4 years ago](https://wordpress.org/support/topic/scroll-doesnt-work-when-javascript-optimization-is-set-to-delayed/#post-15616815)
 * Hello!
 * Some scripts don’t work properly when being delayed. You should exclude plugin’s
   main js:
 * `/wp-content/plugins/page-scroll-to-id/js/page-scroll-to-id.min.js`
 * And if you have the “Prevent other scripts from handling plugin’s links” option
   enabled and “Prevent other scripts from handling plugin’s links selector(s)” 
   field set, you should also exclude:
 * `/wp-content/plugins/page-scroll-to-id/js/jquery.malihu.PageScroll2id-unbind-
   defer.js`
 *  Thread Starter [essaund](https://wordpress.org/support/users/essaund/)
 * (@essaund)
 * [4 years ago](https://wordpress.org/support/topic/scroll-doesnt-work-when-javascript-optimization-is-set-to-delayed/#post-15619857)
 * [@malihu](https://wordpress.org/support/users/malihu/) ~
 * Thanks for your reply.
 * My cache plugin seems to be aggressive when I set JS Delay.
 * I have tested other cache plugins and they don’t break scroll to ID when I set
   JS Delay.
 * So, I have decided to switch cache plugins.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Scroll Doesn’t Work When JavaScript Optimization is Set to Delayed’ is
closed to new replies.

 * ![](https://ps.w.org/page-scroll-to-id/assets/icon-256x256.png?rev=1401043)
 * [Page scroll to id](https://wordpress.org/plugins/page-scroll-to-id/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/page-scroll-to-id/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/page-scroll-to-id/)
 * [Active Topics](https://wordpress.org/support/plugin/page-scroll-to-id/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/page-scroll-to-id/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/page-scroll-to-id/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [essaund](https://wordpress.org/support/users/essaund/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/scroll-doesnt-work-when-javascript-optimization-is-set-to-delayed/#post-15619857)
 * Status: resolved