Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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)

multiple_contents.gif (78.7 KB) - added by sumit 11 years ago.
contents.css

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by Jakub Ś

Status: newpending

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.

  1. Could you explain exact way to reproduce this problem?
  2. Version 3.6.2 is sort of old - do you get the same problem in 3.6.6 or 4.1.1?

Changed 11 years ago by sumit

Attachment: multiple_contents.gif added

contents.css

comment:2 Changed 11 years ago by sumit

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

Last edited 11 years ago by sumit (previous) (diff)

comment:3 Changed 11 years ago by Jakub Ś

Resolution: invalid
Status: pendingclosed

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. file gets called only once.

Last edited 11 years ago by Jakub Ś (previous) (diff)

comment:4 Changed 11 years ago by Jakub Ś

#10518 was marked as duplicate.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy