Prevent cache generation in certain situations
-
Hello,
We are using W3 Total Cache for several of our clients in combination with the theme YOOtheme. The theme has a function where images get resized/cropped on the fly. When you first load a page the URL of an image will look like this:
https://www.domain.tld/wp-admin/admin-ajax.php?action=kernel&p=image&src=WyJ3cC1jb250ZW50XC91cGxvYWRzXC8yMDIyXC8wNFwvdnJpanN0YWFuZC12cmllemVuNi5wbmciLFtbImRvUmVzaXplIixbNjAwLDQ0Niw2MDAsNDQ2XV0sWyJ0eXBlIixbIndlYnAiLCIxMDAiXV1dXQ%3D%3D&hash=07082b84cd4756cd69fa5ae52da2dad6With this script a resized/cropped version is made and saved to a cache folder. The next time the page is visited the cached image is shown.
With W3 Total Cache active it’s possible that the version with the admin-ajax.php image is cached, making the cached page load slower then needed. Would there be a way of detecting if an image loaded using admin-ajax.php is shown on the page and if so prevent caching of the page? The next visit of the page should then be showing the cached image which means W3 Total Cache is also allowed to cache the page.
Regards,
Emiel
- The topic ‘Prevent cache generation in certain situations’ is closed to new replies.