<?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/"
> <channel><title>Comments on: The Challenge of Dynamically Generating Static Content</title> <atom:link href="http://zoompf.com/blog/2009/12/the-challenge-of-dynamically-generating-static-content/feed" rel="self" type="application/rss+xml" /><link>http://zoompf.com/blog/2009/12/the-challenge-of-dynamically-generating-static-content</link> <description>Next Generation Web Performance</description> <lastBuildDate>Wed, 16 May 2012 13:49:16 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: Mathias Bynens</title><link>http://zoompf.com/blog/2009/12/the-challenge-of-dynamically-generating-static-content#comment-19</link> <dc:creator>Mathias Bynens</dc:creator> <pubDate>Mon, 28 Jun 2010 05:39:54 +0000</pubDate> <guid
isPermaLink="false">http://zoompf.com/blog/?p=186#comment-19</guid> <description>Billy,
I see this is included in the Zoompf performance test. How exactly do you check for this? I think I’ve seen some false positives.</description> <content:encoded><![CDATA[<p>Billy,</p><p>I see this is included in the Zoompf performance test. How exactly do you check for this? I think I’ve seen some false positives.</p> ]]></content:encoded> </item> <item><title>By: blepore</title><link>http://zoompf.com/blog/2009/12/the-challenge-of-dynamically-generating-static-content#comment-18</link> <dc:creator>blepore</dc:creator> <pubDate>Wed, 02 Jun 2010 20:58:03 +0000</pubDate> <guid
isPermaLink="false">http://zoompf.com/blog/?p=186#comment-18</guid> <description>We have multiple servers (development, staging, live) for our set up. Our CMS contains about a hundred themes, and at least 18 modules that can be used on every page. A build process that combines every single possibility doesn&#039;t seem that useful in my eyes.
We take the following approach.
1) Check to see if the files to be combined have been modified since they were last built.
2) If not, just output the single combined file.
3) Convert all CSS background images to absolute paths.
4) Store the static file in a known cache location. The name is generated using some hashing mechanism that can be computed at step 2. This will serve the file according to Apache rules with a last-modified time, though I am considering eliminating the last modified header as we also serve with a far future (1 year) expires header. I think the few bytes that are saved is worth it considering the very low chance that someone will re-visit the page in one year+ and STILL have the file in their cache considering the very low cache settings browsers default to.
5) Once an hour run a cron job that checks to see if the static file had been modified. If so run a CSS/JS minifier on it.
Yes, I recognize that we are wasting time checking the combination each time, but when you are rapidly updating content that seems like a minor trade off to me. I see the value in it, but see more value that can be delivered to users using other means (right now I&#039;m adding in additional security hooks, though I am hoping to look in to a memcache solution after that).
Yes, users that visit the page between the creation time and the cron job they&#039;ll get a bit of a delay, but running the minification step during the combining step puts too much of a delay for users from my experience.</description> <content:encoded><![CDATA[<p>We have multiple servers (development, staging, live) for our set up. Our CMS contains about a hundred themes, and at least 18 modules that can be used on every page. A build process that combines every single possibility doesn&#8217;t seem that useful in my eyes.</p><p>We take the following approach.</p><p>1) Check to see if the files to be combined have been modified since they were last built.<br
/> 2) If not, just output the single combined file.<br
/> 3) Convert all CSS background images to absolute paths.<br
/> 4) Store the static file in a known cache location. The name is generated using some hashing mechanism that can be computed at step 2. This will serve the file according to Apache rules with a last-modified time, though I am considering eliminating the last modified header as we also serve with a far future (1 year) expires header. I think the few bytes that are saved is worth it considering the very low chance that someone will re-visit the page in one year+ and STILL have the file in their cache considering the very low cache settings browsers default to.<br
/> 5) Once an hour run a cron job that checks to see if the static file had been modified. If so run a CSS/JS minifier on it.</p><p>Yes, I recognize that we are wasting time checking the combination each time, but when you are rapidly updating content that seems like a minor trade off to me. I see the value in it, but see more value that can be delivered to users using other means (right now I&#8217;m adding in additional security hooks, though I am hoping to look in to a memcache solution after that).</p><p>Yes, users that visit the page between the creation time and the cron job they&#8217;ll get a bit of a delay, but running the minification step during the combining step puts too much of a delay for users from my experience.</p> ]]></content:encoded> </item> <item><title>By: Rob Anderson</title><link>http://zoompf.com/blog/2009/12/the-challenge-of-dynamically-generating-static-content#comment-17</link> <dc:creator>Rob Anderson</dc:creator> <pubDate>Mon, 10 May 2010 05:07:20 +0000</pubDate> <guid
isPermaLink="false">http://zoompf.com/blog/?p=186#comment-17</guid> <description>Thanks for this article. It reinforces to me that just because you can do something, doesn&#039;t mean you should. I was about to embark down this path, but I can now see the benefits of not being lazy!</description> <content:encoded><![CDATA[<p>Thanks for this article. It reinforces to me that just because you can do something, doesn&#8217;t mean you should. I was about to embark down this path, but I can now see the benefits of not being lazy!</p> ]]></content:encoded> </item> <item><title>By: Azza</title><link>http://zoompf.com/blog/2009/12/the-challenge-of-dynamically-generating-static-content#comment-16</link> <dc:creator>Azza</dc:creator> <pubDate>Fri, 19 Mar 2010 02:37:45 +0000</pubDate> <guid
isPermaLink="false">http://zoompf.com/blog/?p=186#comment-16</guid> <description>I work on a website that has over 50 themes. Being able to add php in css is a huge benefit as it makes the maintenance and consistency of the themes so much better.
I&#039;d be interested too see performance results on the following.
Static CSS VS PHP/CSS with caching and expires set in the header.</description> <content:encoded><![CDATA[<p>I work on a website that has over 50 themes. Being able to add php in css is a huge benefit as it makes the maintenance and consistency of the themes so much better.</p><p>I&#8217;d be interested too see performance results on the following.<br
/> Static CSS VS PHP/CSS with caching and expires set in the header.</p> ]]></content:encoded> </item> <item><title>By: Adam Listek</title><link>http://zoompf.com/blog/2009/12/the-challenge-of-dynamically-generating-static-content#comment-15</link> <dc:creator>Adam Listek</dc:creator> <pubDate>Thu, 04 Mar 2010 22:34:40 +0000</pubDate> <guid
isPermaLink="false">http://zoompf.com/blog/?p=186#comment-15</guid> <description>I agree with the downsides of this approach, I did stumble across a couple of solutions of which I&#039;ve combined into something I believe is workable (although more testing is needed).  Here is my current solution:
1) Add content handler for CSS files to be processed as PHP (via HTAccess)
2) In the CSS-PHP file I have created a basic caching mechanism which checks on file-modified times to see if the file needs to be regenerated/minified/combined.
3) If not serve the pre-generated file and send the headers for no ETags and Far Futures Expires
4) Increment a number appended to the end of the generated file in the Header include (HTAccess rewrites any request from style-###.css to style.css, in addition this is invoked via a PHP script called from my SVN deployment server)
I am sure there will be some performance hits but I am hoping that due to minifying/combining/caching the file and sending the correct headers, I can mitigate most problems.  Any thoughts on what everyone else is doing?
-Adam</description> <content:encoded><![CDATA[<p>I agree with the downsides of this approach, I did stumble across a couple of solutions of which I&#8217;ve combined into something I believe is workable (although more testing is needed).  Here is my current solution:</p><p>1) Add content handler for CSS files to be processed as PHP (via HTAccess)<br
/> 2) In the CSS-PHP file I have created a basic caching mechanism which checks on file-modified times to see if the file needs to be regenerated/minified/combined.<br
/> 3) If not serve the pre-generated file and send the headers for no ETags and Far Futures Expires<br
/> 4) Increment a number appended to the end of the generated file in the Header include (HTAccess rewrites any request from style-###.css to style.css, in addition this is invoked via a PHP script called from my SVN deployment server)</p><p>I am sure there will be some performance hits but I am hoping that due to minifying/combining/caching the file and sending the correct headers, I can mitigate most problems.  Any thoughts on what everyone else is doing?</p><p>-Adam</p> ]]></content:encoded> </item> <item><title>By: Billy Hoffman</title><link>http://zoompf.com/blog/2009/12/the-challenge-of-dynamically-generating-static-content#comment-14</link> <dc:creator>Billy Hoffman</dc:creator> <pubDate>Sun, 31 Jan 2010 22:21:10 +0000</pubDate> <guid
isPermaLink="false">http://zoompf.com/blog/?p=186#comment-14</guid> <description>Michael,
I&#039;m doing some measuring right now to show how much of a hit it is and will post again soon.
I am a firm believe of process. It the only way to make something easy and repeatable. You shouldn&#039;t be editing your live files. Yo should have some kind of publishing process. This process, among other things, should automatically minify, crunch, and insert time-stamps for caching. In other words this process should do all this stuff for you and it should be painless and easy. Once this process is in place, it does not make how frequently you edit the site. The process takes care of it. Best of all you avoid the performance hit.</description> <content:encoded><![CDATA[<p>Michael,</p><p>I&#8217;m doing some measuring right now to show how much of a hit it is and will post again soon.</p><p>I am a firm believe of process. It the only way to make something easy and repeatable. You shouldn&#8217;t be editing your live files. Yo should have some kind of publishing process. This process, among other things, should automatically minify, crunch, and insert time-stamps for caching. In other words this process should do all this stuff for you and it should be painless and easy. Once this process is in place, it does not make how frequently you edit the site. The process takes care of it. Best of all you avoid the performance hit.</p> ]]></content:encoded> </item> <item><title>By: Michael Butler</title><link>http://zoompf.com/blog/2009/12/the-challenge-of-dynamically-generating-static-content#comment-13</link> <dc:creator>Michael Butler</dc:creator> <pubDate>Sun, 31 Jan 2010 19:55:35 +0000</pubDate> <guid
isPermaLink="false">http://zoompf.com/blog/?p=186#comment-13</guid> <description>I agree with your first drawback, invoking PHP instead of serving a static file introduces a performance hit... but is it not true that your other listed drawbacks can be solved by outputting the proper headers to the user? i.e. last-modified, long expire dates, set no cookies, etc.
If you have a frequently edited site (css &amp; js) you&#039;ll have to run your compile script every time you make changes (at least on the production server). I&#039;m not sure if that is worth a little PHP performance hit if you make it cacheable.</description> <content:encoded><![CDATA[<p>I agree with your first drawback, invoking PHP instead of serving a static file introduces a performance hit&#8230; but is it not true that your other listed drawbacks can be solved by outputting the proper headers to the user? i.e. last-modified, long expire dates, set no cookies, etc.<br
/> If you have a frequently edited site (css &amp; js) you&#8217;ll have to run your compile script every time you make changes (at least on the production server). I&#8217;m not sure if that is worth a little PHP performance hit if you make it cacheable.</p> ]]></content:encoded> </item> <item><title>By: Twitted by zoompf</title><link>http://zoompf.com/blog/2009/12/the-challenge-of-dynamically-generating-static-content#comment-12</link> <dc:creator>Twitted by zoompf</dc:creator> <pubDate>Mon, 14 Dec 2009 13:52:17 +0000</pubDate> <guid
isPermaLink="false">http://zoompf.com/blog/?p=186#comment-12</guid> <description>[...] This post was Twitted by zoompf [...]</description> <content:encoded><![CDATA[<p>[...] This post was Twitted by zoompf [...]</p> ]]></content:encoded> </item> </channel> </rss>
