Title: Preload Warning
Last modified: January 30, 2021

---

# Preload Warning

 *  Resolved [nicegamer7](https://wordpress.org/support/users/nicegamer7/)
 * (@nicegamer7)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/preload-warning/)
 * Hi Sayontan,
 * I just updated from a rather old version (2.45) to the latest version. Everything
   is working as expected, but I’m seeing a warning in the console. I don’t completely
   understand it because my knowledge of modern JS is a little lacking.
 * Here it is:
 * > [View post on imgur.com](https://imgur.com/WxsKG8j)

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

 *  Thread Starter [nicegamer7](https://wordpress.org/support/users/nicegamer7/)
 * (@nicegamer7)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/preload-warning/#post-13978517)
 * Oh, I forgot to mention, I also use Cloudflare’s Rocket Loader and this warning
   appears before the warning I linked above:
 * > [View post on imgur.com](https://imgur.com/tKUtk1k)
 *  Plugin Author [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/preload-warning/#post-13980430)
 * This would be something to do with CloudFlare’s settings. My guess is that CloudFlare
   might be making some assumptions around how the content is being used on a page,
   and it might not be considering all scenarios. On a page loaded straight, there
   are no such warnings.
 * One thing I would suggest checking is verifying your page source: the script 
   that is coming up with a warning should have a `type="module"` setting (take 
   a look at the source for [one of my pages](https://aquoid.com/plugins/photonic/smugmug/smugmug-photos/)).
   If it doesn’t, then CloudFlare is likely changing things that it shouldn’t, and
   that is problematic: rather than loading an optimized script once, CloudFlare
   is loading 2 scripts that perform the same function.
 *  Thread Starter [nicegamer7](https://wordpress.org/support/users/nicegamer7/)
 * (@nicegamer7)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/preload-warning/#post-13981975)
 * So it is caused by RocketLoader.
 * After turning RocketLoader off, the warnings go away. Although, even with RocketLoader
   on, the script still had the correct `type` attribute.
 * Regardless, I’ll just keep it off. Thanks, Sayontan.
 *  Plugin Author [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/preload-warning/#post-13983792)
 * It might be possible to selectively disable RocketLoader for specific plugins.
   I know that some other caching / CDN plugins let you do that.
 * Also, my guess is that RocketLoader might have had some internal logic, which
   was checking to see if `module` type of scripts had explicit invocation in the
   markup of the page. If such an explicit invocation did not exist, it might have
   had a call to `console.warn()` (i.e. the warning was coming from within RocketLoader
   rather than your browser). In Photonic there is no explicit invocation in the
   page markup, and maybe that is why RocketLoader was thinking that it is not being
   used and was triggering the warning.
 *  Thread Starter [nicegamer7](https://wordpress.org/support/users/nicegamer7/)
 * (@nicegamer7)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/preload-warning/#post-13983949)
 * Yes, there is indeed a way to disable Rocket Loader (it turns out it’s called
   Rocket Loader, not RocketLoader, sorry) for individual scripts.
 * I’m not sure whether this should be something the plugin does automatically or
   if it should be available via a filter, but I think it must somehow be integrated
   in the plugin. See [here](https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-specific-JavaScripts-).
 * edit: I also question whether this is even needed, as the plugin seems to function
   correctly, even with the warning. Although, you did mention the double loading
   that this would be causing, so in that sense I guess it is necessary.
    -  This reply was modified 5 years, 4 months ago by [nicegamer7](https://wordpress.org/support/users/nicegamer7/).
 *  Plugin Author [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/preload-warning/#post-13988038)
 * > edit: I also question whether this is even needed, as the plugin seems to function
   > correctly, even with the warning. Although, you did mention the double loading
   > that this would be causing, so in that sense I guess it is necessary.
 * I don’t believe there is a double-loading happening if you are seeing one script
   included with the `type="module"` setting and another with `nomodule`. Double-
   loading would happen if any of of these was dropped.
 * So I think you are OK even with the warning.
 *  Thread Starter [nicegamer7](https://wordpress.org/support/users/nicegamer7/)
 * (@nicegamer7)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/preload-warning/#post-13989599)
 * Okay, I do see both. So I suppose all is good.

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

The topic ‘Preload Warning’ is closed to new replies.

 * ![](https://ps.w.org/photonic/assets/icon.svg?rev=1972449)
 * [Photonic Gallery & Lightbox for Flickr, SmugMug & Others](https://wordpress.org/plugins/photonic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/photonic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/photonic/)
 * [Active Topics](https://wordpress.org/support/plugin/photonic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/photonic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/photonic/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [nicegamer7](https://wordpress.org/support/users/nicegamer7/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/preload-warning/#post-13989599)
 * Status: resolved