[wp-hackers] Manipulation HTML to use a CDN
bmay at alyte.com.au
Wed Feb 6 05:39:05 UTC 2013
I find the problem with trying to filter individual elements is that you
can miss some, or some items that may be hard coded in the template etc.
At least if you filter the output buffer, you can't miss anything
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Marko
Sent: Wednesday, 6 February 2013 6:16 AM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Manipulation HTML to use a CDN
I saw that one and that is part of the reason I asked since Mark is using
ob_start() for it.
Op 5 feb. 2013, om 21:14 heeft Simon Dunton - WP Sites
<simon at wpsites.co.uk> het volgende geschreven:
> If it's a pull CDN your working with then take a look at Mark Jaquiths
> CDN drop-in that does that job pretty well
> On 5 Feb 2013, at 19:21, Marko Heijnen wrote:
>> Today I was busy to make a really small plugin that handles my CDN for
me and started to play with it so I can control it from another plugin
>> Now I'm curious what is better to do. For example when you want to
offload JS, CSS and images to a CDN. Makes is more sense to use filter as
'script_loader_src', 'style_loader_src' and 'the_content' in favor of
using ob_start with a callback. For me the first one seems cleaner then
running a regex on the whole HTML.
>> If the first one is better does it make sense to be able to use a
filter to modify the post object before it enters the cache instead of
using the filter 'the_content'.
>> If I'm correct you can't do that at this moment.
>> Best regards,
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
wp-hackers mailing list
wp-hackers at lists.automattic.com
More information about the wp-hackers