#43332 closed feature request (maybelater)
Better Basic Support for CDN Integration
Reported by: | bhubbard | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | |
Focuses: | performance | Cc: |
Description
It has become common practice to setup a CDN for WordPress sites for performance. However many users are not always aware how these work or how they impact your site. Many times these CDNs are complicated to setup, support, and manage. Not only that but it's not uncommon to come across sites using multiple CDNs. Plus, I am not even referring to full cdn urls to scripts that are called by developers with wp_register_script.
For example, we have a client site using MaxCDN, but they also use Jetpack which has Photon. In addition to that they installed WP Stateless. WP Stateless and Jetpack Photon would clearly conflict over media (ie. have same functionality), but the maxcdn can still be used for plugin/theme/core assets, so you can make a case where at least 2 of the CDNs can be used together.
I suggest WordPress has some basic functions to let everyone know what CDNs are being setup and used on a site. Then decisions can be made later on such as cdn priority, how url rewrites are performed, etc. I think a good start would be simply adding a function for developers to register each CDN.
<?php function wp_register_cdn( $cdn_handle, $cdn_url, $cdn_type, $cdn_priority, $args ) {}
I can see CDN Type being values such as "Media, Assets, Plugin Assets, Core Assets, etc".
Change History (4)
#2
@
6 years ago
- Milestone Awaiting Review deleted
- Resolution set to maybelater
- Status changed from new to closed
Thanks for the suggestion @bhubbard. WordPress core doesn't include any functionality for managing CDNs, so conflicts between plugins are best managed by the plugins themselves. For now, I'm going to close this as a maybe later and we can reassess if this becomes a common problem that needs intervention within core itself.