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