Per Brion's bug 9209 comment 4, making the sitenotice dismissable (and loaded via JavaScript) for unregistered users is one of the main requirements of the DismissableSiteNotice extension.
That feature now works again, but CentralNotice breaks it. See T59732#1130711