• Hello!

    Here’s the issue. If I enable the Set expires header in W3 Total Cache, the items from the cart can’t be removed anymore. You press X and the page just refreshes. I disabled that function in W3.

    Then, I added the code recommended by our hosting company, in .htaccess:

    ## LEVERAGE BROWSER CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType application/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 2 days"
    </IfModule>
    ## LEVERAGE BROWSER CACHING ##

    Same problem. The item won’t be removed from the cart anymore… I removed several lines and then checked things out, but still nothing. Now I removed the code completely, of course.

    This happened with every version of WooCommerce that we’ve used.

    Any suggestions that might help?

    Looking forward to your reply!

    https://www.ads-software.com/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve never had this issue but I don’t use apache through either.

    In the Database Cache settings, do you have _wc_session_ in the Ignore query strings box?

    Generally, I add all my code to my nginx virtual host, which is the same as how you set them in Apache’s .htaccess.

    <FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf)$">
    ExpiresDefault "access plus 2 hours"
    </FilesMatch>

    It may just be a conflict because I never enable any of the tick boxes for expire headers, etag ect as I do it all from the server itself!

    Then, I added the code recommended by our hosting company, in .htaccess:

    Try removing that block your hosting company said to add, then in w3 total cache, click the install link near the bottom, it will give you the code for the .htaccess.

    Hope this helps.. I don’t remember much about apache anymore.
    Chris

    Thread Starter Radu

    (@broseph)

    Thanks for your reply!

    I have this _wc_session_, but the Database cache isn’t enabled. I only use Page and Browser cache.

    I removed the block of code that my hosting recommends because otherwise the cart won’t work properly.

    The codes that are found in Install are also in my .htaccess.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Item will not be removed from cart with Expires Headers on’ is closed to new replies.