Opened 17 years ago

Closed 16 years ago

#198 closed Bug (duplicate)

Loading 'fck_editorarea.css' two times per instances

Reported by: Koen Willems Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Discussion Cc:

Description

I don't think it's really a bug, but i sure think it should be solved someday.

I was trying to improve the loadingtime of fckeditor, since in a application I use 14 plugins. Studying the logfiles of my server i discovered that fck_editorarea.css is loaded two times per instance (in that specific CMS I use five instances, which makes 10 requests for fck_editorarea.css). With an empty cache the server gives a '200' at the first two request, at the other eight request the server generates a '304'. Well, although a '304' doesn't generate traffic, it still does take some time.

So i think it would be better that fck_editorarea.css is only asked for once per instance, instead of twice. I was looking at the code, but could not figure out why it's called two times.

By the way: this only happens with IE 6 and IE 7.

Regards, Koen Willems

Change History (4)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: Discussion added

The editor uses the editing area CSS file in the editing area (of course), but also uses it in some toolbar combos ("Style" and "Format"), to reflect the css stiles.

I did the same test, using Fiddler, with the FCKeditor demo page. I had the following requests:

/fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default
/fckeditor/editor/js/fckeditorcode_ie.js
/fckeditor/fckconfig.js
/fckeditor.config.js
/fckeditor/editor/skins/default/fck_editor.css
/fckeditor/editor/lang/en.js
/fckeditor/editor/images/spacer.gif
/fckeditor/editor/skins/default/images/toolbar.start.gif
/fckeditor/editor/skins/default/images/toolbar.buttonarrow.gif
/fckeditor/editor/skins/default/fck_strip.gif
/fckeditor/editor/skins/default/images/toolbar.expand.gif
/fckeditor/editor/skins/default/images/toolbar.collapse.gif
/fckeditor/editor/css/fck_editorarea.css
/fckeditor/fckstyles.xml
/fckeditor/editor/css/fck_internal.css

All of them with status 200, and no 304.

As we can see, there is only one request for fck_editorarea.css.

If you are really having different results, couldn't it be that the server configured in some way that IE doesn't get the css from the cache?

Maybe a correct usage of mod_expires would help us on solving it. Something like the following in the .htaccess of FCKeditor:

ExpiresActive on
ExpiresByType text/css "access plus 5 minutes"

comment:2 Changed 17 years ago by Koen Willems

I did some testing this evening. I was able to grab the file from the cache, but it's still requested two times per instance (in my special case that makes 10 times, because i use five instances at a time). Well, i will keep digging in this issue. Since you have different testing results (sure it was IE?) it must have something to do whith my server configuration.

Regards, Koen Willems

comment:3 Changed 17 years ago by Frederico Caldeira Knabben

Actually, after further tests, I've randomly had cases where the CSS has been requested too times, both with status 200! But I believe it is not your case, as you are having 304.

Unfortunately IE is known to be buggy with its cache system. It makes the same request a second time if the prior request was not yet received.

As you are having 304, I would really point you to configure your server to set the expiration of CSS files, as described in my last comment. If you are not running Apache, I think something similar can be achieved with other servers too.

Let us know if you have more news regarding it.

comment:4 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Resolution: duplicate
Status: newclosed

The cache system of #1622 should take care of it.

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