Support » Plugin: ZenCache » excluding some html from cache with javascript?

  • andrew55

    (@andrew55)


    To exclude dynamic content from cache, I’ve seen in the help files that JavaScript can be used to make an AJAX call.

    What if I have a little dynamic html (divs, classes, etc) within my theme or in a widget.

    Does anyone have an example of how javascript can be used in this scenario to keep html from being cached?

    I’ve been experimenting with document write and print, but getting nowhere.

    https://wordpress.org/plugins/zencache/

Viewing 3 replies - 1 through 3 (of 3 total)
  • KTS915

    (@kts915)

    That’s a huge question! And it’s not really a Zen Cache issue; it’s more about javascript.

    I’d suggest instead that you Google for help, particularly on Stack Exchange/Overflow.

    And, if you post again, you’ll have to be much more specific so as to narrow down what you want to do. In other words, you’ll need to set out the code and content you are currently using.

    Thread Starter andrew55

    (@andrew55)

    KTS915 – thanks for the reply. I’ve been searching on Google and Stack Exchange for days about this, and don’t really seem to be getting anywhere. That’s why I thought of coming here.

    I’ll keep looking, but I was hoping to find anyone here that’s had success with preventing caching with Javascript in ZenCache, or any other method.

    I have some simple things for which I need to to exclude caching, like a link in a widget that needs to be different for logged in users/logged out users. I also have a login form in a widget that should also be different for logged in/logged out users.

    It would be great if anyone here even has a link to a resource that’s worked for them.

    Thanks for any suggestions.

    KTS915

    (@kts915)

    It’s difficult to be helpful without knowing specifically what you are trying to do.

    If you put the following string into Google, though, you should get a whole host of useful resources: jquery add content

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘excluding some html from cache with javascript?’ is closed to new replies.