[wp-hackers] Manipulation HTML to use a CDN

Marko Heijnen mailing at markoheijnen.nl
Tue Feb 5 20:15:59 UTC 2013


Hey Simon,

I saw that one and that is part of the reason I asked since Mark is using ob_start() for it.

Marko

Op 5 feb. 2013, om 21:14 heeft Simon Dunton - WP Sites <simon at wpsites.co.uk> het volgende geschreven:

> Hi,
> 
> 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 
> https://github.com/markjaquith/WP-Stack/blob/master/WordPress-Dropins/wp-stack-cdn.php
> 
> Simon
> 
> 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 when needed.
>> 
>> 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,
>> 
>> Marko
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list