Allow cookie value for page cache hash to be customizable
-
First of all, thank you for the excellent performance plugin. It is my favorite.
Hummingbird currently has the ability to take into consideration the cookies when generating cached pages in the
get_cookies()
function.I would like to add my own cookie into the list used to generate the hash. I think it would be a great addition the list of cookies could be updated/customizable from the admin interface similar to the Exclusion section.
foreach ( (array) $_COOKIE as $key => $value ) { // Input var ok. // Check password protected post, comment author, logged in user. if ( preg_match( '/^wp-postpass_|^comment_author_|^wordpress_logged_in_/', $key ) ) { self::log_msg( 'Found cookie: ' . $key ); $cookie_value .= $_COOKIE[ $key ] . ','; // Input var ok. } }
This can be be customizable
'/^wp-postpass_|^comment_author_|^wordpress_logged_in_/'
This would be useful for marketers who run special campaigns and would like to provide alternate information on the same page (price, discounts, offers, terms and etc) using a campaign tracking cookie.
Thanks again
- The topic ‘Allow cookie value for page cache hash to be customizable’ is closed to new replies.