WordPress.org

Forums

WooCommerce - excelling eCommerce
WooCommerce setting unnecessary cookies and thus bursting caches (1 post)

  1. Otto Kekäläinen
    Member
    Posted 1 year ago #

    Hello,

    I've noticed that every time a new user visits the main page of our site they get cookies set (from http response headers):

    Set-Cookie:wc_session_cookie_41fabe3d83dec071984049cbe7b70539=3P5SFNN8UImNq7IurDMdUzuuYgxVZ5y2%7C%7C1389435428%7C%7C1389431828%7C%7C0c5f684370559bf0104848d091aece95; expires=Sat, 11-Jan-2014 10:17:08 GMT; path=/; httponly
    Set-Cookie:woocommerce_items_in_cart=0; expires=Thu, 09-Jan-2014 09:17:08 GMT; path=/
    Set-Cookie:woocommerce_cart_hash=0; expires=Thu, 09-Jan-2014 09:17:08 GMT; path=/

    Setting cookies should be avoided when possible. These cookies seem to be completely useless for users who simply visit the main page of our site. These have the negative effect that generic caching solutions stop caching as cookies are set and exist in later http requests.

    My suggestion would be that the cart related code would default to assume that the items_in_cart=0 and a cookie would be set only at the point when the user actually adds some items to the cart and there is a need to save a value that is not zero.

    I don't know what the wc_session_cookie is for, but I assume that it is not needed until the user actually has done some actions that relies on data to be saved in a session.

    This is a big problem for us as caching does not work and the load on our server is bigger than necessary.

    Otherwise I think WooCommerce is the best WP webshop plugin out there, thanks!

    http://wordpress.org/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by Otto Kekäläinen
  • This topic is not resolved
  • WordPress version: 3.8