The code responsible for rendering the cookie theme function to the page returns before rendering if already dismissed.
The issue with this is that if page cache is enabled and an anonymous user who has already dismissed it visits a page that has not been cached, the cookie message will not be rendered and then cached without it.
Removing the return code will fix this behaviour, so that the cookie message is always rendered, but will always show until the javascript has been executed to hide it. This makes it blink on every page load which is not very sexy.
Possible solutions that I want to discuss:
- Move the wrapper to the bottom of the page, and reposition it with javascript. For non-JS this will not show it to users untill scrolling down?
- Default to hide with CSS and show it with JavaScript, and use a noscript tag to show it for non-JS users. Best solution?
Anyone have thoughts or other solution ideas?
Comments
Comment #2
jzasnake commentedI like the idea of hiding it with CSS by default and then show with JavaScript. Makes for an easier way to override rather than hiding with JavaScript. I can't think of any scenario where you would need to override it but I believe it's good that it's possible.
Comment #4
johnzzonFixed in latest release (7.x-1.5)
Comment #5
johnzzon