What is the difference between a Static and a Dynamic Website?
Technology is full of acronyms and “technospeak” that leaves the outsider baffled and confused. Internet and website are no different, and whilst technospeak has entered the everyday lexicon, most of it remains a mystery even to those who use it!
In order to answer the question, we need to understand the technology, the context, then examine the benefits and usage.
What is a static website?
Static website is using pure HTML without relying on the content, or parts of the content, being pulled from various databases. This means each page is constructed on its own, coded, and loaded individually, no matter who or how the visitor arrives on the page.
What is a dynamic website?
Whilst still using HTML coding, a dynamic website pulls different content into a webpage from the repository of database within the website (or other external sources).
This enables the website to present varying content in a page based on the visitor’s choices, as well as past visit history using cookies, and other variables.
Still doesn’t make sense?!
Let’s make this less technical, in a way that makes more sense to people without a technical understanding.
A web page has many specific elements such as:
- Navigation Keys
- Header (for example slider or image on this page) – not to be confused with “Header” in HTML code, but this is the visible part of the webpage between the nevigation bar and the main content.
- Text Content – this is the bit you are reading now
- Images within the body text – this is the image you see within the text area
- Widgets – special segments that carry out specific functions such as Reservation in a hotel, Subscription to Newsletter, etc. For example, on this page you have a Sidebar to the right that shows “Recent Posts”, “Tags”, “Promo”, “Social Share”, etc. These are widgets as well as the sidebar itself that is a widget (so widgets in a widget!!).
- Footer – Bottom of the page where you see our logo & contact details, Recent Posts, Tags, contact form, copyright statement, etc.
In a static webpage, all of these are predefined and are “hard-coded”, whilst in a dynamic webpage these elements can be altered depending on the visitor’s past visits (cookies), variable conditions (time of the day, language, traffic source, etc.), selections (e-commerce), etc.
Each of these elements are “Dynamically” pulled through to construct a webpage. In order to construct each page, the code must include instructions on which elements, from which database source, under what conditions etc., should be pulled through to create a specific page.
What are the Pros-and-Cons of a Dynamic Website vs a Static Website?!
Some websites have to be created as dynamic websites, but most websites can be made using either method, so as with all things in life, there are pros-and-cons to each method. The website designer must weigh-up the needs of the client vs the technical needs of the website, and recommend the best method. Here are the things you should consider:
Content Update
In a Static website we would code each element of this page individually. We repeat the process for as many pages that you have on your website. If we make a change in the navigation key (e.g. add a new button), or Recent Posts (add a new blog), or want to change our telephone number, we have to make that change on every single page. So if you have 100 pages, that is 100 changes!
In a Dynamic website, the page is pulled through from various repositories (image, text, widgets, footer, header, etc.), so if we want to make a change (add a new navigation button), we just change it in the repository for “Menu” and all 100 pages show the new navigation key.
Looking at ease of applying changes as above, makes you question why anyone would use a static page! But do read on as there is more to this than meets the eye!
Content Management
With Dynamic websites you can use a CMS (Content Management System) on the website, which allows you to make changes without a heavy reliance on coding. A great example of CMS is WordPress (the most commonly used CMS), Joomla, Dupral, etc.
Even when you have a bespoke website, the back-end of the website may allow changes and editing of the content, although more fundamental changes such as design, layout, styling still requires technical knowledge.
In a static website, you have to apply changes to each page, and each element. Whilst there are brave attempts to create CMS products in order to manage content of static websites, they are expensive and require a good degree of technical knowledge. An example of this is the now defunct Adobe Contribute.
Cost of Maintenance
The cost of maintenance is certainly lower for dynamic websites, as changes are easier to implement across the website, specially if you have a large website.
In some sectors such as e-Commerce, Real Estate, Car Rental, etc, where visitors need to select from repositories of products or services, there is no choice but to use a dynamic website. As the products, services, prices, availability, etc. need to be pulled from various databases, then it is easier and quicker to create the entire website using dynamic databases.
With a static website you need to be skilled in coding, and you need to apply any changes across all pages of the website.
Responsive Design
Both static and dynamic websites can be designed as “Responsive” websites, which means pages and content will morph into different layouts depending on the size of the visitor’s screen, without the need to “Zoom-and-Pinch”.
Static websites require more thought and more skilled coding, whilst the dynamic content website deployed using a CMS, such as WordPress together with a Responsive theme, make life easier for non-technical users.
Security
This is where it all gets very interesting. Static pages have 1 single point of attack, namely the FTP port where you can update the code or content remotely. All you have to do is to protect this port, and you are safe and sound.
Dynamic websites have multiple attack points. Dynamic pages are created using PHP, and if you have older versions your website is vulnerable. At the time of writing this article, the current version is PHP 7.x, whilst the previous versions such as PHP 5.x are no longer supported (think of them as Windows XP!).
This means dynamic website require protection at the PHP level, Database Level, CMS level, and FTP level. All PHP based websites are vulnerable to SQL/MySQL injections, Remote Code Execution, Code Injection, Command Injection, etc., which means dynamic websites require good security and defence mechanisms.
Pageload Speed
Static pages are lightening fast to load, and no amount of technical wizardry can make a dynamic website load faster. The reason is simple, a Static page does not have to call on multiple repositories to pull all the information it needs to construct the page. All the data it needs is within the page code, with some exceptions such as the images, which are kept in a defined folder.
Given that pageload time is a big issue for Google, if you are hunting in a highly competitive keyword, you can really pull away from the pack if you use static web pages.
Conclusion
Some types of websites such as e-Commerce, interactive sites, etc. have no choice but to use dynamic content.
Spread of intuitive CMS packages, such as WordPress and Joomla, have made dynamic websites easier to create and maintain by non-technical users.
Finally, the biggest barrier to static websites is the original set up cost, and ongoing cost of content management, which has made them fall out of favour with many users and web designers. Typically a static website will cost 3 times the cost of a WordPress based website to set up. Depending on how often the content needs updating, the cost of maintenance can become eye wateringly painful.
For information on how to create an effective and revenue generating website without the nonsense talk, Contact us for a no obligation first consultation.
