[00] Subset Opt-Out, User guide
LiteSpeed Cache
Last updated
Which LiteSpeed Cache JavaScript settings Subset Opt-Out keeps away from its scripts, when to purge the cache, and the limits.
Subset Opt-Out works with LiteSpeed Cache’s page cache and its JavaScript settings, with no exclusions for you to add. It prints the same HTML for every visitor, so cached pages stay correct, and it keeps its own scripts out of LiteSpeed Cache’s JavaScript optimisation.
What works
Subset Opt-Out relies on two inline scripts in <head> and one script file. They have to run unchanged, in order, before any tracker. It adds them to these lists on the Tuning tab of LiteSpeed Cache → Page Optimization, which cover the settings on the JS Settings tab:
| LiteSpeed Cache list | Settings it covers |
|---|---|
| JS Excludes | JS Minify, JS Combine and JS Combine External and Inline |
| JS Deferred/Delayed Excludes | Load JS Deferred, set to Deferred or Delayed |
| Guest Mode JS Excludes | JavaScript optimisation for first-time visitors in Guest Mode |
Its script tags also carry data-no-defer="1", which LiteSpeed Cache reads as an exclusion, plus data-no-optimize="1" and data-cfasync="false". The settings are described in LiteSpeed Cache’s Page Optimization documentation (opens in a new tab).
Held trackers are printed as type="text/plain", which the browser doesn’t run. Subset Opt-Out turns them back into scripts, in order, once the visitor’s choice allows them.
What needs a setting
Nothing in LiteSpeed Cache. Purge its cache after you install Subset Opt-Out, and again after you switch a service on or off or add a custom rule. Pages cached before then were built without those changes.
Then test a page as an opted-out visitor, or with Global Privacy Control turned on in your browser. Global Privacy Control shows how to check what’s held.
Known limits
- A tracker no service matches isn’t held. LiteSpeed Cache optimises it like any other script, and it runs for everyone. Add a custom rule under Subset → Opt-Out for it.
- Scripts above
wp_headrun first. A tracker printed beforewp_head(), or moved above it, runs before Subset Opt-Out can hold it. - Your own exclusions stay. Subset Opt-Out adds to LiteSpeed Cache’s lists and never removes what you’ve entered.