Don’t set wpSGCacheBypass to zero if it isn’t necessary
-
While anonymous visitors access to the website SG Optimizer set the cookie with zero value (even if it already doesn’t exist). It’ll be good to add simple checking before reset the cookie:
public function remove_bypass_cookie() { if ( empty( $_COOKIE['wpSGCacheBypass'] ) ) { return; } setcookie( 'wpSGCacheBypass', 0, time() - HOUR_IN_SECONDS, '/' ); }
On this way, SG Optimizer will “reset” cookie only when it really needs. It’ll help users which don’t want to set any cookie for anonymous visitors.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Don’t set wpSGCacheBypass to zero if it isn’t necessary’ is closed to new replies.