author: Krasimir Tsonev

Hi there, I'm . Senior front-end engineer with over 13 years of experience. I write, speak and occasionally code stuff.

Another IE surprise

We all know that the usage of InternetExplorer brings a lot of problems for us (the developers). Did you know that there is a JavaScript method createStyleSheet that you can call only 31 times.
There is a nice file manager called CKEditor. It worked fine, but today it produced the following javascript error in IE:
Message: Not enough storage is available to complete this operation.
I googled the problem and found this thread. It perfectly explains the problem - the usage of createStyleSheet. The solution is not very elegant, but I think it solved the problem. I opened ckfinder.js and found the following code:
Which means that the editor checks if this method is available and then uses it. So I edit the line to:
Of course the best option is to reduce the number of the css files that are loaded in the page.
If you enjoy this post, share it on Twitter, Facebook or LinkedIn. Or maybe comment below: