COMMUNITY FORUM
Why does K2 have to load CloudFlare's CDN files?
- 野草工作室
-
Topic Author
- Offline
- New Member
- 专业Joomla建站
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
-
- Offline
- Platinum Member
- Posts: 15920
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.
- 野草工作室
-
Topic Author
- Offline
- New Member
- 专业Joomla建站
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
-
- Offline
- Platinum Member
- Posts: 15920
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.
- 野草工作室
-
Topic Author
- Offline
- New Member
- 专业Joomla建站
Well done, thank you for your work!
野草工作室提供专业Joomla建站服务
www.ycway.com
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
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.
- 野草工作室
-
Topic Author
- Offline
- New Member
- 专业Joomla建站
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
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
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.
- Roland
-
- Offline
- Junior Member
- Posts: 24
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
-
- Offline
- Platinum Member
- Posts: 15920
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.
- Roland
-
- Offline
- Junior Member
- Posts: 24
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.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
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.
- Roland
-
- Offline
- Junior Member
- Posts: 24
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.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- Roland
-
- Offline
- Junior Member
- Posts: 24
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.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
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.
- 野草工作室
-
Topic Author
- Offline
- New Member
- 专业Joomla建站
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.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- 野草工作室
-
Topic Author
- Offline
- New Member
- 专业Joomla建站
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.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Noted on my to-do.
Please Log in or Create an account to join the conversation.