Which is Better, a Dynamic Website or a Static Website?
One of the things that should be included in any of your website design plans is to choose whether you want to have a dynamic website or a static website. One is not better than the other and your choice should be based on your own research and your needs and wants. There are advantages and disadvantages to each and I'll try to break it down into digestible chunks.
Advantages of a Dynamic Website
The number one advantage of a dynamic website over a static website is that it can be updated automatically by the website software on the server. This is how blogs work. Queries are performed on a database and the results are returned immediately.
Dynamic websites are driven by software on the server. With most of this software, all of the administrative actions are performed by a specialized back end at the server. Because the software uses a database (normally), multiple users can use the back end administration at the same time without tripping over each other.
Dynamic websites usually appear, to the casual observer, to contain fresh content even when the content is simply regenerated (dates changed, etc.), which would require a lot more keyboard work with a static website.
Disadvantages of a Dynamic Website
The primary disadvantage of a dynamic website is page generation and serving speed. A page URI is requested by someone's browser, the website software is then loaded, the database is queried, the page is generated and then the page is displayed. Most of this can be mitigated by using proper page caching software (either in the software or at the web server or both) and intermediate opcode caching.
Even if everything is optimized for a dynamic website, things can still go wrong. With shared hosting, for example, web hosting speed can be an issue. It's actually one of the more common issues I've discussed with people.
Advantages of a Static Website
Static website pages are served faster than dynamic website pages and nothing is faster than static pages which have been pre-gzipped on the website. More on that in a minute.
Static website pages are served by the web server without any intermediary action, such as database queries and dynamic page generation.
Disadvantages of a Static Website
Static website pages have to be manually updated and then uploaded each time a page is updated.
You can serve pre-gzipped pages, but you still have to serve non-gzipped pages because not all browsers can decompress them. The number of browsers like that is dwindling, but some people are locked into the older browsers for one reason or another. Two sets of pages will have to be stored on the server, one set gzipped and one set not gzipped. Finally, you have to have a web server that supports the .htaccess rules (or something similar) to send the right pages to the right browsers.
On the Web Today
If you surf the web a lot, you should notice that a lot of static websites still exist even though some of the most popular website software is designed to work with dynamic websites. There are good reasons for their existence and I won't delve into it here.
There are also a lot of dynamic websites in existence and the number continues to grow. Unfortunately, many of these websites are being built and operated by people who don't know how to optimize them to the point where they perform as well as they can and page speed is one of the performance factors I'm talking about.
The website software I'm developing is designed to make static websites appear to be dynamic websites. It can display the familiar blog widgets like "recent posts" and things of that nature, if so desired. The websites will be dynamic on a personal web server. Static pages will be generated and uploaded via the software itself. Of course, it will only work for single-user websites.
A Simple Summary
I've just touched on a few of the advantages and disadvantages of dynamic vs. static websites. I'm sure there are some I haven't considered. You're more than welcome to weigh in with your own opinions, if you have any.
Similar Posts:

