Contents

Docs Speed and hosting

Page caches and speed plugins

Modals work with page caches as they are: opening one never asks WordPress for anything. A few settings change the timing.

  1. Delay JavaScript (WP Rocket, WP-Optimize) holds modals that open by themselves until the visitor first moves or taps. To open them on time, add /content/modules/modal-kit to the delay exclusions. The path covers Pro too.

  2. Remove unused CSS services can drop the styles of a closed modal. In WP Rocket, keep /content/modules/modal-kit and /content/modules/modal-kit-pro stylesheets whole in its safelist. LiteSpeed Cache and Jetpack Boost are told to leave them whole.

  3. In Breeze, don’t combine its lazy-load with Delay all JavaScript: its lazy-loader then never starts.

  4. Country rules make each visitor’s page differ, so your cache must vary by country or skip those pages.

Good to know

With nothing to set, Modal Kit tells SiteGround Speed Optimizer, LiteSpeed Cache, W3 Total Cache, Breeze, Jetpack Boost, 10Web Booster and NitroPack to leave its scripts and styles alone, and keeps its scripts off their CDNs.

Modals wait while a page is prerendered, and on LiteSpeed’s Guest Mode reload, so a visit counts once.

Still stuck? We’ll help.