I found that the lowest-level subdomain corresponds to one of the reserved device names, as described in Restrictions on the file mask and file name properties in Internet Explorer, accessing the localStorage object will cause an error.
This problem probably occurs because internally Internet Explorer tries to access the file system using the reserved device name when accessing the localStorage object to satisfy the Storage initialization steps of the object .
This is, of course, a very important question, but if your page comes from the server with the lowest subdomain level, this is exactly any of con , prn , aux , clock$ , nul , com1 , com2 , com3 , com4 , com5 , com6 , com7 , com8 , com9 , lpt1 , lpt2 , lpt3 , lpt4 , lpt5 , lpt6 , lpt7 , lpt8 or lpt9 (for example, http://prn.example.com ), this may well be the reason why you see this problem.
Choosing a lower subdomain that was not a reserved device name in this situation solved the problem.
source share