Cookies added to the homepage
-
Dear Plugin Developer,
I am contacting you because after a thorough analysis I have discovered that your plugin is adding cookies to the homepage of my website, although customer reviews are only visible in internal pages, related to actual products.
This has serious implications because it prevents my homepage to be fully cached because pages with cookies cannot be cached.
The response to the HTTP header of the homepage includes:
set-cookie: cr_wpml_is_filtered=yes; path=/; SameSite=Lax
The cookie value “cr_wpml_is_filtered” is added by
/customer-reviews-woocommerce/includes/reviews/class-cr-ajax-reviews.php
Could you please tell me why this is happening and how I could prevent the plugin to insert cookies in the homepage?
Thanks in advance.
F.
The page I need help with: [log in to see the link]
-
Hi,
Thank you for using CusRev.
This feature is used to make our plugin to compatible with WPML when using Ajax review. If you want to disable this feature, please go to Reviews > Settings > Review Extension > Visual Style: WooCommerce (basic user interface).
Let me know if it helps.
Dear pear,
Thank you for your response. Unfortunately, I could not find the option that you mentioned in the plugin settings. Can you please provide me with more details on how to access this option?
I am also wondering what the consequences would be if I disable this feature, as my website is multilingual, but the customer reviews are not translated. Will this affect the functionality of the plugin or cause any issues with the reviews?
Lastly, Could you please confirm that by deactivating this option no cookies will be added to the home page?
Thank you for your assistance.
Best regards,
F.
Hi,
Thanks for your additional information.
Please update our plugin to the latest version 5.19.0 and recheck the option in Review Extensions tab.
>> Will this affect the functionality of the plugin or cause any issues with the reviews?
No, disable this feature then you will use the standard reviews section on the product page.>> Lastly, Could you please confirm that by deactivating this option no cookies will be added to the home page?
I think yes.Dear Support,
Following your advise I have downloaded the last version and found the visual style feature and setup it up as Woocommerce. However, there is no impact on the homepage cookies.
When your plugin is active makes the website very slow. GTMetrix prove that the plugin is adding cookies to the homepage preventing the page caching and increasing the website load time by 3 times.
This was not happening in the past, something must have been modified with recent plugin updates. Currently, running your plugin means slowing down the website very heavily.
I believe this is a serious, severe drawback of the plugin.
Please let me know how to remove the added cookies from the homepage, this is unsustainable and it does not make your plugin any longer usable.
Thanks in advance,
F.
Hi,
Thank you for your additional information.
It looks like our plugin is deactivated on your site so I cannot check the header cookie. Can you please share a screenshot of when you use GTMetrix to analyze your site and our plugin activated?
You can also follow the article below to delete the cookie with custom code
https://wpmudev.com/blog/set-get-delete-cookies/Dear Pear,
Thanks for your reply.
Indeed i had to deactivated the plugin because that it makes my website very slow and google would penalize me.
I made the test that you have asked, please find below the results.
With the plugin de-activated the GTmetrix waterfall is: https://snipboard.io/T0co2j.jpg
and a total loading time of 2s.
With the plugin activated the GTmetrix waterfall is: https://snipboard.io/RJpHC9.jpg
and a total loading time of 6.2s.
Please consider that the response to the HTTP header of the homepage when the plugin is active, includes:
set-cookie: cr_wpml_is_filtered=yes; path=/; SameSite=Lax
It would sufficient if you could tell me how to de-activate the cookie that your plugin adds to my homepage. The added cookie has a negative effect on the speed and I believe that other users of your plugin would benefit. I am sure that it is just a matter of time and other people would realize the issue that I am reporting.
Could you please release a new plugin version without the mentioned cookie or tell me how to put a patch.
Thanks in advance,
F.
Dear Pear,
I tried to use the code provided in the article you shared to delete the cookies, but unfortunately, it caused my website to stop working. I added the code to the function.php file, and after that, the website started showing the message “there has been a critical error on this website”.
Could you please suggest any alternative ways to remove the cookies that are being added to the homepage?
Thank you in advance for your help.
Best regards,
F.Hi,
Thanks for your feedback.
You can try to use this PHP code to remove the cookie filter
add_action( 'get_header', function() { if( has_filter( 'wpml_is_comment_query_filtered' ) && ! wp_doing_ajax() ) { remove_action( 'get_header', array( 'CR_Ajax_Reviews', 'wpml_is_filtered' ), 10, 2 ); } }, 99 );
If you are familiar with coding, please take a look at the file wp-content/plugins/customer-reviews-woocommerce/includes/reviews/class-cr-ajax-reviews.php line 32-34
I hope that helps.
Hi Pear8398,
Thanks a lot for your support.
I commented the code line 32-34 of the plugin file the file wp-content/plugins/customer-reviews-woocommerce/includes/reviews/class-cr-ajax-reviews.php and cookies are not longer part of the header. This is great however, it is not a sustainable solution because as soon as you will release a new plugin’s versions I will loose this change and I will encounter again the same problem.
I then tried to add the code that you have suggested in functions.php of wordpress, with the intention of removing the action therefore the cookies. However, there must be something wrong with the function because although the page loads, the code does not remove the added cookies in the header.
Could you please help me to implement a wp function that effectively works for removing the cookie in the header?
Alternatively, could you please consider modifying your plugin in a way not to add this cookie in the header? This current approach is a real killer of loading time and it is a pity that it affects negatively your plugin for pursuing compatibility with WPML. You may consider to implement an option in the setting to allow users to decide whether they prefer activating the WPML compatibility at the expenses of loading speed or deactivating WPML compatibility.
I hope you could help and i thank you in advance.
F.
Hi Pear8398,
Could you please reply to my previous message as it is now 3 weeks that I am unable to activate your plugin because of the extremely long loading time ?
I would really appreciate if you could help me in implementing a working solution.
Thanks in advance!
F.
Thanks for providing additional details!
?
As explained above, our plugin adds a cookie for compatibility with WPML. It is added only under certain conditions:- WPML plugin must be enabled
- It is a product page of WooCommerce
I’ve just tested the page load speed of your website without our plugin. The total load time is 7.4 seconds: https://i.ibb.co/YfrpKdn/Untitled-2.jpg
So, it doesn’t looks like the slow page load speed is caused by the cookie added by our plugin for compatibility with WPML because, as you mentioned, our plugin is currently disabled on your website. Even if it was enabled, it still doesn’t add the WPML compatibility cookie on the home page because it is not a WooCommerce product page.
Dear Pistachio6321,
Thanks for your reply.
Allow me to clarify that there was a misunderstanding. In all my previous communication I was referring to the LCP time (not the total loading time).
I have sufficient evidence to prove that the plugin is clearly the cause of the long LCP loading time. Please consider the below comparison (similar to what already reported in one of my previous messages of 2 weeks ago).
Without your plugin active:
https://snipboard.io/pIKtvN.jpg
Here, we have LCP=1.2s while total loading time=11.1s
With your plugin active:
https://snipboard.io/x62bio.jpg
Here, we have LCP=3.5s while total loading time=11.7s
This is caused by the fact that the plugin is adding cookies to the header of the homepage.
Please note that when I comment the code line 32-34 of the plugin file the file wp-content/plugins/customer-reviews-woocommerce/includes/reviews/class-cr-ajax-reviews.php cookies are not longer part of the header and LCP loading time of the website is fast, in line with the expectations.
I tried to add the code that you have suggested in functions.php of wordpress, with the intention of removing the action therefore the cookies. However, there must be something wrong with the function because although the page loads, the code does not remove the added cookies in the header.
Could you please help me to implement a wp function that effectively works for removing the cookie in the header?
Alternatively, could you please consider modifying your plugin in a way not to add this cookie in the header? This current approach is a real killer of loading time and it is a pity that it affects negatively your plugin for pursuing compatibility with WPML. You may consider to implement an option in the setting to allow users to decide whether they prefer activating the WPML compatibility at the expenses of loading speed or deactivating WPML compatibility.
Thanks in advance for your help.
F.
Thanks for providing additional details!
As mentioned above, our plugin adds the WPML compatibility cookie only to the product pages. It does not add it to other pages such as a home page.
Could you please check if you are using a recent version of the plugin with the original and not modified source code?
We haven’t heard from you for more than two weeks. For this reason, I’ll assume that either you are not interested in this question/problem anymore or it has been resolved. If you still require any help, please start a new forum topic.
- The topic ‘Cookies added to the homepage’ is closed to new replies.