How we stop caching of particular div when i am using w3 total cache plugin? [closed]

W3TC, like super cache and others, does full page caching, you can’t tell it to ignore portions of pages as it will in practice mean that it will not cache those pages any longer, or will do partial caching which much less effective.

You have 3 options to include dynamic content in a cached page

  1. don’t cache the page. shopping carts usually set up a cookie you you can configure W3TC, usually in the .htaccess file, not to serve cached content when it detects that value.

  2. use an iframe to host the shopping cart instead of the div. The caching plugin should be configured to no cache the iframe page and it should be something very simple like displaying info from a cookie that will not require running the wordpress core (otherwise you lose almost all advantage of caching)

  3. use JS to generated the div. this is probably the best approach if all info is in cookies.