Keyword

Why does K2 have to load CloudFlare's CDN files?

  • 野草工作室
  • 野草工作室's Avatar Topic Author
  • Offline
  • New Member
  • 专业Joomla建站
More
7 years 3 months ago #166573 by 野草工作室
Why does K2 have to load CloudFlare's CDN files? was created by 野草工作室
Why does K2 have to load CloudFlare's CDN files? Front-end or background must be loaded!

This is acceptable if it is optional, but I can not change settings from the site's control panel.

I come from China, when we use K2, because of the need to load these CDNs, causing K2 to run very slowly ...

I know using CDN is to some extent to speed up loading, but for some areas may be the opposite.

If I use K2 for my intranet article content system, the website will not be available without Internet access.

Hope later updated version, at least to switch localhost load, so that can can meet the needs of different situations

thank you very much

野草工作室提供专业Joomla建站服务
www.ycway.com

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 3 months ago #166610 by Krikor Boghossian
Replied by Krikor Boghossian on topic Why does K2 have to load CloudFlare's CDN files?
Hello there,

We were not aware of this isn't CloudFlare available in China?
www.cloudflare.com/network/china/

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

  • 野草工作室
  • 野草工作室's Avatar Topic Author
  • Offline
  • New Member
  • 专业Joomla建站
More
7 years 2 months ago #166755 by 野草工作室
Replied by 野草工作室 on topic Why does K2 have to load CloudFlare's CDN files?
Hello,

If the site is located somewhere in the world and is not accessible or slow to users in China, using CloudFlare CDN may allow it to access or speed up access.

However, if the website itself is set up in China, the user access in China is extremely fast. After using CloudFlare CDN, the access speed to users in China is seriously affected.

I think such a problem, not only in China, but also in other parts of the user may also be affected.

If you can use the local server files, why must be use CDN?

I hope K2 will be able to handle more usage scenarios and needs, more people love and use.

Thank you.

野草工作室提供专业Joomla建站服务
www.ycway.com

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 months ago #166772 by Krikor Boghossian
Replied by Krikor Boghossian on topic Why does K2 have to load CloudFlare's CDN files?
Hello,

2.8.1 Will be released shortly. We will try to include an option.

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

  • 野草工作室
  • 野草工作室's Avatar Topic Author
  • Offline
  • New Member
  • 专业Joomla建站
More
7 years 2 months ago #166810 by 野草工作室
Replied by 野草工作室 on topic Why does K2 have to load CloudFlare's CDN files?
Hello,

Well done, thank you for your work!

野草工作室提供专业Joomla建站服务
www.ycway.com

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

More
7 years 2 months ago #166912 by JoomlaWorks
Replied by JoomlaWorks on topic Why does K2 have to load CloudFlare's CDN files?
Hi there,

could you please let me know (verify) whether any of these CDNs is blocked in China?

www.jsdelivr.com/
unpkg.com/

There seems to be a chinese CDN for JS and CSS libs (www.staticfile.org/?ln=en) but its catalog is not up to date unfortunately.

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

  • 野草工作室
  • 野草工作室's Avatar Topic Author
  • Offline
  • New Member
  • 专业Joomla建站
More
7 years 1 month ago - 7 years 1 month ago #167404 by 野草工作室
Replied by 野草工作室 on topic Why does K2 have to load CloudFlare's CDN files?


In this case, it takes only tens of milliseconds for my website to load a local file, and it takes more than a minute to load a CDN file, which greatly affects the work.

I always believe that the CDN can only speed up the network in certain circumstances, but it is not a panacea, and in some cases it will have counterproductive effects. K2 should be open. It should be possible to choose whether or not to load CDN files, rather than generalize.

野草工作室提供专业Joomla建站服务
www.ycway.com
Attachments:
Last edit: 7 years 1 month ago by 野草工作室.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 1 month ago #167426 by Krikor Boghossian
Replied by Krikor Boghossian on topic Why does K2 have to load CloudFlare's CDN files?
Thank you for letting us know.
You can track the progress of the feature request here github.com/getk2/k2/issues/447

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

More
6 years 11 months ago #168055 by Roland
Hello,

when 2.8.1 is ready? Is there an option to deactivate Cloudflare?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 11 months ago #168082 by Krikor Boghossian
Replied by Krikor Boghossian on topic Why does K2 have to load CloudFlare's CDN files?
Hello,

Unfortunately 2.8.1 is not ready yet.
You can try a 'hack' for the time being and change the links that point to CloudFlare to your local files in this file github.com/getk2/k2/blob/master/administrator/components/com_k2/helpers/html.php#L105

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

More
6 years 5 months ago #170486 by Roland
Hello,

currently the version 2.9.0 is stable.
Is there in meantime an option to deactivate CDN loads or do I have further to modify core files?

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

More
6 years 5 months ago #170497 by JoomlaWorks
Replied by JoomlaWorks on topic Why does K2 have to load CloudFlare's CDN files?
In the upcoming K2 v2.10.0 (currently 2.9.1 on GitHub) we use jsDelivr's CDN so the K2 package is smaller and so client-side performance is better. There is no option to disable it currently.

If you wish to manually change the CDN references, only 4 files contain jsDelivr URLs:
/administrator/components/com_k2/elements/k2tags.php
/administrator/components/com_k2/elements/k2users.php
/administrator/components/com_k2/helpers/html.php
/administrator/components/com_k2/helpers/stats.php

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

More
6 years 5 months ago #170499 by Roland
According our GDPR we really need such an option to disable complete CDN loads.

Please insert such an option so we don´t need to change manually core files which gets overwritten on each update...

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

More
6 years 5 months ago - 6 years 5 months ago #170507 by JoomlaWorks
Replied by JoomlaWorks on topic Why does K2 have to load CloudFlare's CDN files?
That's exactly the reason we switched from CDNJS (by CloudFlare) to jsDelivr. The latter stores nothing personal from users. See this: github.com/jsdelivr/jsdelivr/issues/18067
Last edit: 6 years 5 months ago by JoomlaWorks.

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

More
6 years 5 months ago #170523 by Roland
Hello,
I think it would be also a great feature if your users have the ability to decide if they want to use CDN.
Such a features should not explode your development ressources I think...

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

More
6 years 5 months ago #170540 by JoomlaWorks
Replied by JoomlaWorks on topic Why does K2 have to load CloudFlare's CDN files?
Like I said, it increases the package size a lot.

But any developer could make a plugin that makes K2 "GDPR friendly" by dynamically replacing the CDN URLs.

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

  • 野草工作室
  • 野草工作室's Avatar Topic Author
  • Offline
  • New Member
  • 专业Joomla建站
More
5 years 9 months ago #172754 by 野草工作室
Replied by 野草工作室 on topic Why does K2 have to load CloudFlare's CDN files?
If K2 does not use CDN, it will increase the size of the installation package to unacceptable. Then, if you can develop another plug-in, you can provide file loading localization function independently.
Even if this plugin is a fee, I can accept it, this is at least a solution.
Otherwise I can only manually hack the K2 core file.

野草工作室提供专业Joomla建站服务
www.ycway.com

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

More
5 years 9 months ago #172759 by JoomlaWorks
Replied by JoomlaWorks on topic Why does K2 have to load CloudFlare's CDN files?
The next update will use jsDelivr which -if I recall properly- is GFW friendly. Are you referring to something else?

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

  • 野草工作室
  • 野草工作室's Avatar Topic Author
  • Offline
  • New Member
  • 专业Joomla建站
More
5 years 9 months ago #172765 by 野草工作室
Replied by 野草工作室 on topic Why does K2 have to load CloudFlare's CDN files?
Yes, I am very happy to see an improvement in this issue.
But there is still a need to not use CDN at all. For example, I need to develop a website used in the LAN for information management, user management and other functions.
Not using a CDN can make the problem much simpler.
If the website must load the CND file, then
1. When developing a website, you must connect to the Internet, otherwise you will not be able to develop.
2. When using the website system, the website users must also connect to the Internet, and cannot use it directly on the local area network.

Although for many people, the Internet is ubiquitous, it does not necessarily exist for everyone or all projects. I hope that K2 can satisfy more usage scenarios, so I have been paying attention to this issue.

Thank you.

野草工作室提供专业Joomla建站服务
www.ycway.com

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

More
5 years 9 months ago #172769 by JoomlaWorks
Replied by JoomlaWorks on topic Why does K2 have to load CloudFlare's CDN files?
I'll see if there's an option to use LocalStorage for that. It would make working offline easier, without the need to bundle all external assets into K2. The only requirement would be to load your local site once over a network connection so the browser could cache the 3rd party assets. And of course this way of using K2 could be an option that you switch to on in K2's settings, aka, it would not affect the actual live/production website.

Noted on my to-do.

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


Powered by Kunena Forum