Static Publishing

Software that uses the static publishing method stores your content in some kind of database, but then generates static HTML pages in a publishing step. Your main blog page, individual story pages, archive pages, and category pages are generated as flat HTML files and stored on the server, or even on a different server. These files are then served by the web server with no further requirement from the blog software. Blogger, Movable Type, and Radio UserLand, among others, are of this type.

The major advantage of publishing your blog to static HTML files is speed. All web servers serve static pages the fastest. If you have an extremely busy site, with an underpowered or an overloaded server, the difference will be quite apparent. With adequately powered servers, the speed increase is less significant. Another advantage of static publishing is that you don't need the content database on your web server. In practice, it may be located on the same machine, but that is not required.

On the downside, with pages published statically, adding a new story requires several of your pages to be regenerated; sometimes, it may require regenerating all of them. If you want to change the template used on your site—to add a new header or even just to correct a spelling mistake—every single page will need to be regenerated. This can be extremely slow. For a large site, even on a powerful server, this process can slow the server almost to a halt.

This also means that, if you want visitors to be able to comment on your stories, they will need to wait for the page to be regenerated with their new comments. This regeneration is not usually done immediately, as it may overload the server on a busy site. It could even be abused as a form of denial-of-service attack. Alternatively, you could use another service, often located on a different server (several companies provide this service), to handle your site's comments.

Lastly, generating hundreds or even thousands of flat files takes up a lot of space. The fixed parts of your pages—the header, sidebar, footer, and so on—are duplicated in every HMTL file. On a large site with thousands of files, this can consume a considerable amount of space.

Was this article helpful?

0 0

Post a comment