[wp-trac] [WordPress Trac] #43332: Better Basic Support for CDN Integration
WordPress Trac
noreply at wordpress.org
Thu Feb 15 22:25:36 UTC 2018
#43332: Better Basic Support for CDN Integration
-----------------------------+-----------------------------
Reporter: bhubbard | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Keywords:
Focuses: performance |
-----------------------------+-----------------------------
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
<?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".
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43332>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list