<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Don&#039;t include wp-load, please.</title>
	<atom:link href="http://ottodestruct.com/blog/2010/dont-include-wp-load-please/feed/" rel="self" type="application/rss+xml" />
	<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/</link>
	<description>Random meanderings you&#039;re probably not interested in</description>
	<lastBuildDate>Mon, 02 Apr 2012 11:59:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta4-20725</generator>
	<item>
		<title>By: Interview with Ronald Huereca - WordPress Tavern Forum</title>
		<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/comment-page-1/#comment-1939</link>
		<dc:creator>Interview with Ronald Huereca - WordPress Tavern Forum</dc:creator>
		<pubDate>Sun, 21 Mar 2010 00:56:24 +0000</pubDate>
		<guid isPermaLink="false">http://ottodestruct.com/blog/?p=667#comment-1939</guid>
		<description>[...] are Ronald&#039;s opinions on Otto&#039;s recent blog post regarding use of wp-load.php: http://ottodestruct.com/blog/2010/do...p-load-please/    Personal blog &#124; Twitter Menu plugin &#124; CSS Generator &#124; Premium Support &#124; New plugin: Code [...]</description>
		<content:encoded><![CDATA[<p>[...] are Ronald&#039;s opinions on Otto&#039;s recent blog post regarding use of wp-load.php: <a href="http://ottodestruct.com/blog/2010/do" rel="nofollow">http://ottodestruct.com/blog/2010/do</a>&#8230;p-load-please/    Personal blog | Twitter Menu plugin | CSS Generator | Premium Support | New plugin: Code [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto on WordPress &#187; Blog Archive &#187; Don&#8217;t include wp-load, please.</title>
		<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/comment-page-1/#comment-1938</link>
		<dc:creator>Otto on WordPress &#187; Blog Archive &#187; Don&#8217;t include wp-load, please.</dc:creator>
		<pubDate>Thu, 04 Mar 2010 22:22:25 +0000</pubDate>
		<guid isPermaLink="false">http://ottodestruct.com/blog/?p=667#comment-1938</guid>
		<description>[...] Don&#8217;t include wp-load, please. March 4, 2010, 4:22 pm   Originally published here: http://ottodestruct.com/blog/2010/dont-include-wp-load-please/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Don&#8217;t include wp-load, please. March 4, 2010, 4:22 pm   Originally published here: <a href="http://ottodestruct.com/blog/2010/dont-include-wp-load-please/" rel="nofollow">http://ottodestruct.com/blog/2010/dont-include-wp-load-please/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto</title>
		<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/comment-page-1/#comment-1936</link>
		<dc:creator>Otto</dc:creator>
		<pubDate>Fri, 19 Feb 2010 14:36:34 +0000</pubDate>
		<guid isPermaLink="false">http://ottodestruct.com/blog/?p=667#comment-1936</guid>
		<description>I have a plugin which stores custom CSS whole in the database in the same way. Currently, I output it like this. Right at the top of the plugin:

if ($_GET[&#039;trigger&#039;] == 1) { ?&gt;
	$options = get_option(&#039;plugin_options&#039;);
	header( &#039;Content-Type: text/css; charset=utf-8&#039; );
	echo $options[&#039;custom_css&#039;];
	exit;
}

This is the fastest way I can find to output the data without actually writing it to a static file. This stops WordPress as early as possible, right at the plugin loading, minimizing the impact on the system. Still not ideal, of course, but it works. And in my case, the custom CSS is being read by a third party which does static caching separately from me, it&#039;s not being read by the browser directly, so it&#039;s fairly minimal to begin with.</description>
		<content:encoded><![CDATA[<p>I have a plugin which stores custom CSS whole in the database in the same way. Currently, I output it like this. Right at the top of the plugin:</p>
<p>if ($_GET['trigger'] == 1) { ?&gt;<br />
	$options = get_option(&#8216;plugin_options&#8217;);<br />
	header( &#8216;Content-Type: text/css; charset=utf-8&#8242; );<br />
	echo $options['custom_css'];<br />
	exit;<br />
}</p>
<p>This is the fastest way I can find to output the data without actually writing it to a static file. This stops WordPress as early as possible, right at the plugin loading, minimizing the impact on the system. Still not ideal, of course, but it works. And in my case, the custom CSS is being read by a third party which does static caching separately from me, it&#8217;s not being read by the browser directly, so it&#8217;s fairly minimal to begin with.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/comment-page-1/#comment-1935</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 18 Feb 2010 23:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://ottodestruct.com/blog/?p=667#comment-1935</guid>
		<description>In the past I stored the CSS whole inside the WP database, then outputted it via a file which loaded wp-load.php. I&#039;m now caching that in a static file, with a fall-back to wp-load.php when the static file does not exist. It seems to be working well so far.</description>
		<content:encoded><![CDATA[<p>In the past I stored the CSS whole inside the WP database, then outputted it via a file which loaded wp-load.php. I&#8217;m now caching that in a static file, with a fall-back to wp-load.php when the static file does not exist. It seems to be working well so far.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/comment-page-1/#comment-1934</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 17 Feb 2010 02:27:36 +0000</pubDate>
		<guid isPermaLink="false">http://ottodestruct.com/blog/?p=667#comment-1934</guid>
		<description>Yes that works, I use that method myself. Unfortunately it of course only works when people visit one of your pages a second time :(</description>
		<content:encoded><![CDATA[<p>Yes that works, I use that method myself. Unfortunately it of course only works when people visit one of your pages a second time <img src='http://ottodestruct.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto</title>
		<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/comment-page-1/#comment-1933</link>
		<dc:creator>Otto</dc:creator>
		<pubDate>Mon, 15 Feb 2010 22:07:25 +0000</pubDate>
		<guid isPermaLink="false">http://ottodestruct.com/blog/?p=667#comment-1933</guid>
		<description>I have used the second method I detailed above for CSS before. I&#039;m not proud of that, but it was necessary in the given context.

For speed reasons alone, I would recommend generating the CSS whole, storing it all in a single place, then merely outputting it on demand, instead of generating it fresh from options each and every time.</description>
		<content:encoded><![CDATA[<p>I have used the second method I detailed above for CSS before. I&#8217;m not proud of that, but it was necessary in the given context.</p>
<p>For speed reasons alone, I would recommend generating the CSS whole, storing it all in a single place, then merely outputting it on demand, instead of generating it fresh from options each and every time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hikari</title>
		<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/comment-page-1/#comment-1932</link>
		<dc:creator>Hikari</dc:creator>
		<pubDate>Sun, 14 Feb 2010 03:52:53 +0000</pubDate>
		<guid isPermaLink="false">http://ottodestruct.com/blog/?p=667#comment-1932</guid>
		<description>Hey Otto very nice tutorial tnx!

I&#039;ve seen a plugin use some HTTP header calls to set cache settings, is that possible?</description>
		<content:encoded><![CDATA[<p>Hey Otto very nice tutorial tnx!</p>
<p>I&#8217;ve seen a plugin use some HTTP header calls to set cache settings, is that possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/comment-page-1/#comment-1931</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sun, 14 Feb 2010 01:52:43 +0000</pubDate>
		<guid isPermaLink="false">http://ottodestruct.com/blog/?p=667#comment-1931</guid>
		<description>I spoke too soon. I just saw your comment above about AJAX and it seems this is not the correct way to handle those either .... back to the drawing board for me :p</description>
		<content:encoded><![CDATA[<p>I spoke too soon. I just saw your comment above about AJAX and it seems this is not the correct way to handle those either &#8230;. back to the drawing board for me :p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/comment-page-1/#comment-1930</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sun, 14 Feb 2010 01:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://ottodestruct.com/blog/?p=667#comment-1930</guid>
		<description>You said &quot;Really, really, bad idea. That&#039;s a cross-site-scripting hole just waiting to be exploited.&quot;

http://www.wptavern.com/forum/plugins-hacks/1105-sending-settings-javascript-files.html

Admittedly I wasn&#039;t validating my data very well in my example code there. I should have used more explicit checks for specific values or for integers.</description>
		<content:encoded><![CDATA[<p>You said &#8220;Really, really, bad idea. That&#8217;s a cross-site-scripting hole just waiting to be exploited.&#8221;</p>
<p><a href="http://www.wptavern.com/forum/plugins-hacks/1105-sending-settings-javascript-files.html" rel="nofollow">http://www.wptavern.com/forum/plugins-hacks/1105-sending-settings-javascript-files.html</a></p>
<p>Admittedly I wasn&#8217;t validating my data very well in my example code there. I should have used more explicit checks for specific values or for integers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://ottodestruct.com/blog/2010/dont-include-wp-load-please/comment-page-1/#comment-1929</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sun, 14 Feb 2010 01:38:46 +0000</pubDate>
		<guid isPermaLink="false">http://ottodestruct.com/blog/?p=667#comment-1929</guid>
		<description>I agree on that now for scripts, however there are other uses, including dynamically created CSS for when you can&#039;t write to the WP installation to cache the CSS file statically and so using this technique is the only option to use without loading the CSS directly into each page. In my experience, the difference in page load times is too small to measure on most servers, but on some servers it totally blows out the load times really badly.

I assume the exact same techinque would be used for processing AJAX data too.</description>
		<content:encoded><![CDATA[<p>I agree on that now for scripts, however there are other uses, including dynamically created CSS for when you can&#8217;t write to the WP installation to cache the CSS file statically and so using this technique is the only option to use without loading the CSS directly into each page. In my experience, the difference in page load times is too small to measure on most servers, but on some servers it totally blows out the load times really badly.</p>
<p>I assume the exact same techinque would be used for processing AJAX data too.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using xcache
Object Caching 451/486 objects using xcache

Served from: ottodestruct.com @ 2012-05-21 13:49:54 -->
