Including - cq/personalization/components/clientcontext - causing site wide javascript malfunction when browser cookies are DISABLED - CQ5.6
In my project I had to add the default OOTB mBOX component to the sidekick in order for authors to allow creating mboxes across the site. Going through adobe documentation, I found that we have to include cq/personalization/components/clientcontext after start of body tag and cq/cloudserviceconfigs/components/servicecomponents before end of body tag.
All went fine, until a user reported that the whole site is looking weird and everything is out of place. On inspecting we found that most of the javascript plugins and normal javascript code wasnt executing and that was leading to most things out of place. Then we found that it was happening because of COOKIES Disabled in that user's Firefox.
When we enabled the cookies on that browser, everything looked great as always.
We then DISABLED the cookies again and removed the include of cq/personalization/components/clientcontext from start of body tag. Now even with Disabled cookies the site wide js ran smoothly without any issues. All looked fine after removing the clientcontext include.
This brought us to the conclusion that cq/personalization/components/clientcontext include causes ISSUES when Cookies are disabled.
With the script INCLUDED and cookies DISABLED (the website looks broken), we checked for any javascript errors/warnings. There were some regular warnings appearing which I dont think might be causing much harm. There are NO JS ERRORS found in the FF console.
These warnings appear only for kernel.min.js. If we EXCLUDE the component and the run the page and see the console, the same regular warnings appear for almost all js files like jQuery.min.js and many others. So I am assuming these warnings are not much of a concern. But the point that only kernel.min.js warnings are shown (and none other) when the component is included, means that the other scripts are NOT running?? may be?
Has anyone experienced the same ever? Any pointers to what we can do make the cq/personalization/components/clientcontext not affect our site wide JS, in case of disabled cookies.