Archive forDynamic to Static

Dynamic versus static web pages optimization

The choice between static and dynamic when building software for the web is a critical one, and one that I think deserves in-depth discussion.

In a dynamic site, pages are assembled “on the fly” as and when they are requested. Most server side languages as PHP, JSP and ASP powered sites do this technology by actively encourages dynamic content creation. Generating pages dynamically allows for all sorts of clever applications, from e-commerce, random quote generators to full on web applications such as Hotmail. See this dynamic web page generation diagram:

Dynamic web page generation

In a static publishing system, HTML pages are pre-generated by the publishing software and stored as flat files on the web server, ready to be served. This approach is less flexible than dynamic generation in many ways and is often ignored as an option as a result, but in fact the vast majority of content sites consist of primarily static pages and could be powered by static content generation without any loss of functionality to the end user. See this static web page generation diagram:

static web page (HTML) generation

The most widespread example of a static publishing system is D2S, which rebuilds static files for a site each time a page is added or modified - although it can be configured to serve content dynamically instead.

Benefits of dynamic publishing

At first glance, the benefits of dynamic publishing are obvious. What is frequently ignored are the benefits of static publishing, at least for content-driven sites which don’t have any heavy need for dynamic features. The most obvious benefit is performance; serving static files is what web servers such as Apache are optimised to do, and they can do it fast.

The reliability advantage

A big part is that it takes the pressure off of going live. You can be sure before going live that the published website is correct. The actual CMS may explode in flames, but the site will be fine. Going live with a web application is always a stressful process, and anything that reduces the stress of that is a great benefit. As time goes on, static publishing is also a big stress reduction for the system administrator, since a simple Apache configuration is a lot more reliable under different loads and configurations than any dynamic site will be.

Performance issues

Static site will increase the performance of any website or online application. Static pages will have a ‘circular’ effect on speed: static pages will take up less load time; less load time will allow for better performance under stress, and better performance will reduce the server stress and give the user faster downloads. Note, though, that accessibility should always have a higher priority than performance.

Static over dynamic - Conclusion

Not everything needs to be dynamically created. If there are pieces of information that have quite a long dynamic cycle, embed them statically, but perhaps allow for new items to be re-embedded easily, through a pseudo-dynamic process.

Comments (2)


SEMPO 2006 State of the Market Survey is Now Open | Usability and Searchability | | | 2006 November | 2006 October | 2006 September | 2006 August | 2006 July | 2006 June | About | Acroterion Home Page | Dynamic to Static | PayPerClick | Google Uncover | Google Essentials | AdSense | Selected News | Outsource SEO verus Inhouse SEO | MYTH SEO is not an exact science | Google Algorithm and Axiomatic Set Theory | IAB Google Yahoo Microsoft Askcom working together on Click Fraud | Searchability and Usability | Number of Visits in Google search results | New Google ads on maps | I8217m Feeling Lucky how to increase ranking with one little effort 2 | Google tops search engines in June | Google tests classifieds in print | What is Google Analytics | Back Button | AdSense and AdWords under the hood | Google Checkout Grab it now | | MSN did it with its new maps service | Top Ten keywords and SEO Seniorityfaithfulness | Google credit award under Lane8217s Gifts v Google classaction settlement | it is not YouTube it is Social Network | How to get PageRank 9 nine with one little effort 4 | How to increase ranking with one little effort 3 | Web Awareness The secret ingredient in Google formula | Spell checkers and Morphological Analysis | Google Health A Vertical Search | Google AdWords Ad Scheduling is live | Dynamic versus static web pages optimization | PPC 2006 Analysis | NoneBLOG