Title: Unpredictable js caching issue
Last modified: September 30, 2026

---

# Unpredictable js caching issue

 *  [frenchomatic](https://wordpress.org/support/users/frenchomatic/)
 * (@frenchomatic)
 * [21 hours, 44 minutes ago](https://wordpress.org/support/topic/unpredictable-js-caching-issue/)
 * I have an unpredictable caching issue which is hard to track down.
 * I have a sticky menu header with a white background which shows when I scroll
   the page. When the page first loads the menu background is transparent.This is
   the correct behaviour. It never fails when in development mode on cloudflare 
   or when logged in. What seems to happen is some time later, perhaps hours or 
   even days, the page (not logged in and cached) no longer shows the transparent
   menu background but instead it behaves like it has already scrolled down to give
   a white background. I can roll up or down but still the white background remains
   fixed. The javascript which inserts a transparent menu is not firing.
 * WordPress 7.1.2 WP Bakery 9.0.1 Super page cache 5.3.5

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

 *  Plugin Support [rodicaelena](https://wordpress.org/support/users/rodicaelena/)
 * (@rodicaelena)
 * [3 hours, 52 minutes ago](https://wordpress.org/support/topic/unpredictable-js-caching-issue/#post-19033870)
 * Hi there,
 * Thanks for reaching out! To help us investigate and pinpoint what’s causing the
   issue with your sticky header, could you please provide a few additional details?
   
   1. What JS optimization options (such as JS Minification, Delay JS, or Defer 
   JS) do you currently have enabled in Super Page Cache or other caching/optimization
   plugins?2. Does the issue persist if you temporarily exclude your theme’s sticky
   header JS script from optimization/caching?3. If possible, could you share the
   URL of the affected page along with any JavaScript errors shown in your browser
   console when the issue occurs?
 * Once we have these details, we can guide you on the right configuration or investigate
   further!
 *  Thread Starter [frenchomatic](https://wordpress.org/support/users/frenchomatic/)
 * (@frenchomatic)
 * [1 hour, 22 minutes ago](https://wordpress.org/support/topic/unpredictable-js-caching-issue/#post-19034026)
 * Hi I am using auto-optimize but it has been doing it for some time (so a few 
   super cache versions now but I ignored it and just cleared the cache manually–
   the site wasn’t doing much). The problem started before automatise was installed–
   it does it even if I deactivate autoptimze.
 * Don’t know about deactivating the sticky header – I will try it and report back.
   I suspect it wont because the menu background is now transparent all the time.
 * No javascript or php errors.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funpredictable-js-caching-issue%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wp-cloudflare-page-cache/assets/icon-256x256.gif?rev=3234997)
 * [Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals](https://wordpress.org/plugins/wp-cloudflare-page-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cloudflare-page-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [frenchomatic](https://wordpress.org/support/users/frenchomatic/)
 * Last activity: [1 hour, 22 minutes ago](https://wordpress.org/support/topic/unpredictable-js-caching-issue/#post-19034026)
 * Status: not resolved