Keyword

K2.css, .js and Magnific Popup Overrides

  • Roman Lipatov
  • Roman Lipatov's Avatar Topic Author
  • Offline
  • Premium Member
More
1 month 4 weeks ago - 1 month 4 weeks ago #169631 by Roman Lipatov
Roman Lipatov created the topic: K2.css, .js and Magnific Popup Overrides
Hello!
I found on main page of my site this inline styles, js and css resources:
/* K2 - Magnific Popup Overrides */
						.mfp-iframe-holder {padding:10px;}
						.mfp-iframe-holder .mfp-content {max-width:100%;width:100%;height:100%;}
						.mfp-iframe-scaler iframe {background:#fff;padding:10px;box-sizing:border-box;box-shadow:none;}
<link href="/templates/bpnet/css/k2.css?v=2.9.0" rel="stylesheet" />
<script src="/media/k2/assets/js/k2.frontend.js?v=2.9.0&amp;sitepath=/"></script>

But main page is related to another component, it does not have any k2 modules.
And this problem appears on any NOT k2 page.

This is not normal.
We are fighting to speed up our sites. We are trying to minimize each byte on the page.
But K2 just loads own styles, css and js on any page.
How to change this behavior??
Thanks.
Last Edit: 1 month 4 weeks ago by Roman Lipatov.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 month 4 weeks ago #169642 by Fotis
Fotis replied the topic: K2.css, .js and Magnific Popup Overrides
First off, please remove the URL from your signature. There are other ways to promote your site.

Secondly, the K2 system plugin loads a bare minimum of CSS and JS because K2 modules require them. And as you know, modules can exist along side other component's, e.g. a contact form (component) with a latest blog posts K2 Content module.

The things loaded directly from your server (K2's CSS) is only a few KBs (like, really a few). The rest come from jsDeliver.com which loads the assets via HTTP/2 which is super fast.

Client-side optimization is nice, but the problem is usually server-side optimization. K2's few KBs don't impose a performance issue to that extent.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Roman Lipatov
  • Roman Lipatov's Avatar Topic Author
  • Offline
  • Premium Member
More
1 month 3 weeks ago - 1 month 3 weeks ago #169722 by Roman Lipatov
Roman Lipatov replied the topic: K2.css, .js and Magnific Popup Overrides

Fotis wrote: Secondly, the K2 system plugin loads a bare minimum of CSS and JS because K2 modules require them


K2 loads styles, css and js on any page. Even if this page does not have any K2 modules.

(K2's CSS) is only a few KBs (like, really a few)


When each component will load own CSS styles on ALL site pages - we will have bulky sites.
I have many components on my site, but only K2 make this:

Last Edit: 1 month 3 weeks ago by Roman Lipatov.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 month 2 weeks ago #169758 by Fotis
Fotis replied the topic: K2.css, .js and Magnific Popup Overrides
K2 is usually the backbone of a Joomla site. So it's not any component. It's up to you to decide whether this is a real issue or just micro-optimization. The other way around is for us to check when K2 content is present and then add these includes which is seriously overkill.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

Moderators: william white