When I upgraded my website from M2.3.5 to M2.4.2, I get this notice “The store will not work correctly in the case when cookies are disabled.” on top of the head frontend for 3 seconds. But I installed a new M2.4.2 have not to get that notice(Cookie Restriction Mode = No). I found a div id named “cookie status” The store will not work correctly in the case when cookies are disabled. but I can’t find which file can control this. I don’t need the notice display, so how to do that?
Today I will guide you:
Did disable in the Default cookie settings.
It’s taking time to hide because there is using js for hide. you can use css for hide instaed of $script = ‘document.querySelector(“#cookie-status”).style.display = “none”;’;
Content comes from vendor/magento/module-theme/view/frontend/templates/js/cookie_status.phtml
save and clear the cache, reload the web page and everything is solved.