• Resolved Teo Alex

    (@altesin)


    Hello,
    How do i prevent the caching of a inline script added using wp_add_inline_script() ?
    I am using a plugin witch adds a security nonce as an inline script value and the nonce is cached with the whole page, the nonce is available for 12 hours and the cache for 1 month resulting in a failed nonce verification. I want that #dlm-xhr-js-before script is not cached.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Venkat Raj

    (@webulous)

    Hi @altesin

    You can’t prevent a part of page being cached.
    But
    1. You can exclude a list of URLs from being cached.
    2. You can exclude based on conditional tags, like is_product, is_tag, is_category, etc
    3. based on cookie names

Viewing 1 replies (of 1 total)
  • The topic ‘Prevent caching of inline script’ is closed to new replies.