<p>You&#39;re also forgetting that a great many shared hosts do not allow the use of fopen.</p>
<p>Just something else you may want to consider.</p>
<div class="gmail_quote">On 18 May 2011 16:44, &quot;Satish Gandham&quot; &lt;<a href="mailto:satish.iitg@gmail.com">satish.iitg@gmail.com</a>&gt; wrote:<br type="attribution">&gt; I followed the discussion on use of open that happened before,and read this<br>
&gt; several times,<br>&gt; <br>&gt; <a href="http://lists.wordpress.org/pipermail/theme-reviewers/2010-December/003192.html">http://lists.wordpress.org/pipermail/theme-reviewers/2010-December/003192.html</a><br>&gt; <br>
&gt; I&#39;m not convinced whats suggested there as the best way is the best way.<br>&gt; <br>&gt; -----<br>&gt; *<br>&gt; *<br>&gt; <br>&gt; *Method 1: Insert the dynamic CSS directly into the HTML using the wp_head<br>&gt; call.*<br>
&gt; <br>&gt; *Method 1 has the lowest server impact. When you make the call to get*<br>&gt; *the page, it creates the page and outputs all the dynamic stuff in one*<br>&gt; *shot. Some people find the CSS in the html to be aesthetically*<br>
&gt; *displeasing, but the fact of the matter is that this is the fastest,*<br>&gt; *simplest, and best way to do it.*<br>&gt; <br>&gt; <br>&gt; How the server impact is the lowest? CSS has to be generated dynamically<br>
&gt; every time the page is loaded. Bandwidth is wasted as the CSS cannot be<br>&gt; cached.<br>&gt; <br>&gt; If we go by method two described below, CSS is generated only when the theme<br>&gt; options are changed and then its just loading the static file, that can be<br>
&gt; cached by the browser.<br>&gt; <br>&gt; My theme allows user to customize every element of the site and some styles<br>&gt; are loaded only when the user enables a particular option.<br>&gt; <br>&gt; So, my dynamic CSS is around 30kb on average.<br>
&gt; <br>&gt; In what way the above method is the BEST?<br>&gt; <br>&gt; When thousands are users are going to use my theme, I&#39;m willing to spend<br>&gt; extra time to offer the best solution rather than some simple and quick<br>
&gt; solution.<br>&gt; *<br>&gt; *<br>&gt; <br>&gt; *Method 2: Write dynamic CSS to a file, link to the file in the head.*<br>&gt; *Method 2 has a problem in that you&#39;re doing file writing from the*<br>&gt; *theme. This is bad because you cannot guarantee that you have*<br>
&gt; *permissions to even write files. Assuming you try to write them to the*<br>&gt; *uploads folder, then part of your theme is now outside the theme*<br>&gt; *directory, which is confusing. Also, by including the CSS as a*<br>
&gt; *separate file, you&#39;re creating another call to the server, which even*<br>&gt; *Google Webmaster Tools will tell you is a thing to avoid.*<br>&gt; <br>&gt; <br>&gt; Whats wrong with having a theme file outside the theme folder?<br>
&gt; What is confusing and Confusing to whom?<br>&gt; <br>&gt; An extra http request if far better than adding 30kb of weight to every<br>&gt; page. Also considering the number of images loaded by theme and the number<br>
&gt; of stylesheets loaded the by plugins, the ONE additional http request is<br>&gt; insignificant.<br>&gt; <br>&gt; Who told you they are confused?<br>&gt; <br>&gt; There are 2500+ users on my theme support forum, and none of them ever had<br>
&gt; problems with the stylesheet located in uploads folder.<br>&gt; <br>&gt; PS: I&#39;m pretty sure that I wont win this like all arguments, but I couldn&#39;t<br>&gt; just put 100kb of CSS and javaScript on every page and waste the bandwidth<br>
&gt; of the blog owner and the reader.<br>&gt; <br>&gt; <br>&gt; Kind Regards<br>&gt; Satish Gandham<br></div>