When you have caching enabled in Performance tab (Cache pages for anonymous users) the cookie message does not disappear when you click on the agree button. This could probably be solved by adding some JavaScript to check if the cookie is set or not, or alternatively clear the cache when the button is pressed.

Comments

johndevman created an issue. See original summary.

jzasnake’s picture

Status: Active » Needs work

I am currently looking into this. It would of course work by adding a JS snippet to hide it, but I would like to keep it working without using any JS. And clearing the cache every time someone presses the button would be inefficient, I want to keep it simple and lightweight. Worst case scenario I will add some JS. Thanks for posting this issue!

ksi’s picture

Especially on mobiles it is very unconvenient to have to click the cookie message again and again.

What if you added some javascript to your module that checks if the cookie 'simple_cookie_compliance_dismissed' is set at page load time. And if it is set already, hides the message form. That way the existing functionality without using javascript stays in place. And in addition for clients with javascript enabled the cookie message from cached pages has to be clicked only once.

danyg’s picture

Hi!

Here's my patch.
It hides the compliance bar by default and it uses jquery to check the cookie value. If it not set, the jquery shows the bar. If it's enabled by default and we hide the message by jQuery, it will appear for a small time until jquery processing.
I hope it helps.

jzasnake’s picture

Status: Needs work » Closed (fixed)

I have now fixed this issue in the latest version of Simple Cookie Compliance. It now utilizes JavaScript to remove the window when cache is enabled on the site. The issue still resides when using cache and having JavaScript disabled, and it is something that will be fixed, I just don't know exactly how at this moment. Thank you all for your patience and contributions!