Static vs Generated HTML and Content-Length

Posted July 27th, 2009 at 09:55 CST in Web Development | Tags: , | 1 Comment »

A frustrating aspect of writing in PHP is that almost all HTML is generated from PHP and is offered to the client after some processing is done. Under Ideal conditions, the amount of processing would be minimal, but in the case of the code I am currently working on at my job, it is not. I believe the root of the problem though is probably something most professional PHP programmers experience: the code they are working on is apart of a collaboration and being under a tight schedule, they cannot afford the resources to change what they would like.

The answer I most often get is “since it already works, let’s focus on something else.” With static HTML files on the server, apache can easily send the Content-Length, but even with PHP generated HTML, I could store all HTML in variables, then calculate the size and use apache’s Content-Length header to speed up page load times. Time is a valuable resource though, and being a good employee, I’m gonna (try to) do what I’m told.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response to “Static vs Generated HTML and Content-Length”

  1. CORY says:


    CheapTabletsOnline.com. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Best quality drugs. Online Pharmacy. Order drugs online

    Buy:Prozac.Lipitor.Aricept.SleepWell.Zetia.Nymphomax.Female Cialis.Benicar.Amoxicillin.Cozaar.Zocor.Acomplia.Lipothin.Advair.Ventolin.Female Pink Viagra.Lasix.Seroquel.Wellbutrin SR.Buspar….

Leave a Reply