Title: Weird javascript issue&#8230;
Last modified: June 15, 2020

---

# Weird javascript issue…

 *  Resolved [Dekadinious](https://wordpress.org/support/users/dekadinious/)
 * (@dekadinious)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wierd-javascript-issue/)
 * I have a problem with a newsletter slide-in box that I have made for my site.
   If you go into incognito-mode and go to the front page, then choose an article
   and then scroll down to the bottom, you will get the box displayed.
 * Now, if you click on the X, the box will not close. If you refresh the page and
   scroll down, it will close. Now it will not appear because of cookies, but just
   close the incognito-window and open a new one.
 * If you now go directly to the URL of the article, it will close. So it only refuses
   to close if you go from the front page to the article. Or from another page where
   it does not exist to the article.
 * Disabling the Litespeed Cache Plugin fixes the issue.
 * I think this happens because of how Litespeed handles the loading of subsequent
   pages? I think the javascript file does not understand that the element exists
   when you go form a page where it does not to a page where it does.
 * How do we fix it?
    -  This topic was modified 5 years, 11 months ago by [Dekadinious](https://wordpress.org/support/users/dekadinious/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwierd-javascript-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wierd-javascript-issue/#post-12988692)
 * Hi,
 * What if you reset to default setting?
 * I am thinking might be some conflict due to JS combine/JS monify.
 * Best regards,
 *  Thread Starter [Dekadinious](https://wordpress.org/support/users/dekadinious/)
 * (@dekadinious)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wierd-javascript-issue/#post-12991625)
 * Is there an easy way to revert to my current settings if I reset to the default
   settings?
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wierd-javascript-issue/#post-13000192)
 * Hi,
 * You can go to Toolbox –> export/import , where you can save your current setting
   into exported file for later restoration
 * Best regards,
 *  Thread Starter [Dekadinious](https://wordpress.org/support/users/dekadinious/)
 * (@dekadinious)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wierd-javascript-issue/#post-13015328)
 * Hello!
 * Disabling js-combine have seemed to fix the issue with the slidein not closing.
 * But I also have a Facebook like button at the bottom of every post. This is the
   standard code from Facebook. This does not appear if you come from the front 
   page, but does appear if you refresh the page while on the post.
 * Looking at the source code shows that the iFrame is not loaded at all when it
   does not show up. Just an empty div. Disabling Litespeed fixes this problem also.
   I have tried different settings and this problem is tied to minifying of JS-files.
 * How do we fix both these issues with the best performance of the cache?
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wierd-javascript-issue/#post-13016226)
 * Hi,
 * You can try exclude certain JS file from being combined/minified and certain 
   ifram efrom being lazyloaded
 * Best regards,
 *  Thread Starter [Dekadinious](https://wordpress.org/support/users/dekadinious/)
 * (@dekadinious)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wierd-javascript-issue/#post-13016372)
 * I get the same problem with Google Analytics. The only page that is tracked is“/”,
   the root page. When navigating the site, nothing changes on Analytics Real-time.
   But when refreshing the page, the correct page appears.
 * Disabling Litespeed Cache fixes this. One can ask oneself what the point is if
   all JS-files has to be excluded?
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wierd-javascript-issue/#post-13016389)
 * Hi,
 * It’s caused by instant click, disable it will solve the issue.
 * Best regards
 *  Thread Starter [Dekadinious](https://wordpress.org/support/users/dekadinious/)
 * (@dekadinious)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wierd-javascript-issue/#post-13021197)
 * Thank you!!
 * This solved all the problems even with JS-combine and minify turned on. It also
   solved the Analytics problem. This should probably be part of the documentation?
   That unexpected results may happen.

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

The topic ‘Weird javascript issue…’ 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/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 8 replies
 * 2 participants
 * Last reply from: [Dekadinious](https://wordpress.org/support/users/dekadinious/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/wierd-javascript-issue/#post-13021197)
 * Status: resolved