• Resolved audpxi

    (@audpxi)


    Hello!
    We have a problem with WP Litespeed server esi shortcodes and wp_enqueue_script function. We have a shortcode that enqueues scripts only on pages where the shortcode is used. But when using ESI in shortcode -> it doesn’t enqueue those custom styles and scripts. Does anyone know a workaround or should we just enqueue these script on every page?

Viewing 1 replies (of 1 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    because ESI is a sub-request that happens AFTER the main request , so you can not really load more things into a page that is already sent and rendered by browser

    maybe try embed the css or js into the shortcode output directly

    best regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Probled with ESI shortcode and wp_enqueue_script’ is closed to new replies.