• Resolved szponix

    (@szponix)


    Hi everyone,

    I’m using LiteSpeed Cache alongside WP-Polls, displaying a poll via a shortcode inside a sidebar widget.

    Normally, embedding a poll directly prevents LiteSpeed Cache from caching the whole page (as it flags the poll as dynamic content). To bypass this, I’ve been using LSCache’s ESI (Edge Side Includes) feature (per their guide: https://docs.litespeedtech.com/lscache/devguide/advanced/#esi). This allowed me to cache full pages while keeping WP-Polls functional.

    However, after updating WP-Polls to version 3.0.1, ESI seems to have broken.

    Looking at the changelog for 3.0.1:

    “CHANGED: The stylesheet, the voting script and the inline poll bar styles load only on pages that show a poll, a polls archive or the poll widget; every other page sheds all three…”

    Because in my setup the poll is fetched dynamically via an ESI block, WP-Polls probably doesn’t detect the poll during the main page request. As a result, its specific assets (CSS/JS) are not loaded on those pages, leaving the poll broken.

    I understand this behavior probably stem from how ESI operates, but would it be possible to add an option/toggle to force load WP-Polls assets globally across the entire site for users relying on ESI or similar setup?

    Thanks!

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

You must be logged in to reply to this topic.