That makes sense. I never thought of the modules.
I know that the CSS and JS files are cached and would only be downloaded once; I meant many visitors to my website will be downloading the K2 files (once) even if they never land on a page with any K2 on it.
Once again, a Joomla limitation has us by the balls.
Anyway, thank you for taking the time to post a detailed response Fotis, I appreciate it.
I'm a big fan of K2, and though I've found the odd annoyance, I'm sure it will only get better as it matures :)
JoomlaWorks said:Including one css and one js file with K2 sitewide was a necessary decision for various reasons, the most important being: - Joomla's cache does not behave properly with modules meaning it cannot display attached css/js code using the API - having the above reason in mind we cannot have module css/js rendered only for the modules (through some system plugin) cause we cannot determine where they appear. E.g. you can have some K2 modules on your site's frontpage yet not have the K2 component.
- deciding to load 1 css and 1 js file is actually good in terms of performance cause it's the bare minimum, plus the browser will cache these 2 files on the first page load. If you add to that the built in templating features of K2 you can disable the css include with the flip of a switch in the component params.
And to clarify one thing you said, the browser does NOT reload these two files AFTER the first page load.
K2 is a professional content tool and it's built with performance and flexibility in mind. ;)Mark Simpson said:Hi bunglehaze, Thanks for the comment.
I'm sorry if I wasn't clear. I don't have the issue you mention. K2 works as it is meant to for me; mine is not a bug report (your issue certainly sounds like a bug).
I have provided all the info I need to.
K2 requires one or more js and css files. It loads this to the < head >.
My complaint is that this is done site-wide. If I have a 1000 page website, and only one page uses K2, every single one of those 1000 pages loads the K2 js and css files. This is inefficient, unnecessary, and undesirable, hence my post.
Kind regards
-m
bunglehaze said:Mark, what other components are you using? I had a very similar issue with a couple of components dragging through K2 articles, I also had conflicts in js that caused it. You need to feed back more if you expect one of the devs or community to be able to dig in and offer advice. leigh