#10425 closed Bug (invalid)
multiple contents.css loaded for multiple instance of ckeditor on same page
Reported by: | sumit | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.6.2 |
Keywords: | Cc: |
Description
its been observed in all major browser that multiple contents.css gets loaded. say for 5 ckeditor instance on page 5 times the contents.css gets loaded
Attachments (1)
Change History (5)
comment:1 Changed 12 years ago by
Status: | new → pending |
---|
comment:2 Changed 12 years ago by
Sorry for not making myself much clear.. please see the steps to reproduce this issue
Precondition - CKEDITOR 3.6.2 . i am not sure for other version , i am checking that and will update you on this in next comment
in my page i have added 3 CKEditor instances . now while inspecting the dom with either FIREBUG for firefox or ctrl+shift+i for chrome or IE developer tool i am getting three contents.css gets loaded . please see the multiple_contents.gif , this i have taken from chrome console
comment:3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Tested under CKEditor 3.6.6.
I have consulted this issue with my colleagues and we decided there is no error here.
If you aren't using inline editor then you are using iframed editor. Editor contentarea is separate document in iframe. Each iframe calls its own contents.css from script. There is no other way to do it because each editor may have different contents.css.
Good news is - browsers seem to handle this pretty well. If file is the same it gets called only once. For example in Chrome: clear browser cache and then reload page with Ctrl+F5. You will notice that contents.css gets called only once. Now press Ctrl+F5 again - contents.css gets called multiple times but from cache. If you examine more closely these requests you will notice that they are made from document.js file and that contents.css is actually loaded from cache so there is no overhead.
If you disable cache in browser contents.css gets called only once on which page refresh. I'm guessing that if you make request for the same file browser ignores it.
Conclusion is this is how it works. Each editor document calls its own CSS but if you have same file for all editor instances browsers handle it pretty well i.e. it gets called only once.
I have checked this in two different operating systems on two machines. I have also asked my colleague to check this. Neither of us has gotten more than 1 contents.css loaded (neither logs, dev tools have shown more than one contents.css loaded).
It seems when using default editor with default browser settings there is no problem with multiple contents.css loaded.