Blogs

The Resurgence of Static

Static sites have been around as long as the web, but today’s static sites serve a very different purpose than the unsophisticated HTML and image files that you used to FTP to your web server. Making your site (or portions of your site) static can have a tremendous upside and can guarantee speed, scalability, and security. Combine these benefits with the power of modern JavaScript app frameworks, REST endpoints, and Content-as-a-Service capabilities, and you have a refreshing choice for developers who want full control of their web frameworks and are fighting to minimize every last millisecond of loading time.

The move from static to dynamic...

We saw the emergence of dynamic when the constraints of static failed to meet the new demands of the web. They were hard to update and did not allow for dynamic navigation and user interactivity. In order to maintain timely and relevant websites, companies started to store their content in databases and dynamically deliver it to their site visitors. This spurred the growth of content management systems (CMS), which allowed for the managing of content and files that could be dynamically displayed on different pages and areas of a website. A CMS meant that a content editor could update the content of a page or site and their changes would be reflected instantly, without having to use FTP or know HTML. These dynamic publishing platforms unleashed the tidal wave of online publishing that has changed our world and how we consume information.

...and back to static again.

However, due to constraints, such as the amount of server horsepower needed to dynamically publish, the amount of system admins needed to run a large scale production site, security issues and more, we’ve seen static start to make a comeback.

This doesn’t mean we’ve gone back to plain HTML sites and gotten rid of the CMS completely, but as a development community, we’ve come to a happy medium that brings together the database needs of dynamic with the advantages of static - speed, scalability, security, and performance.

Benefits of static

Caching and performance

Dynamic sites began to show an impact to performance due to the complexity of dynamic code running on a server for every request, which slowed down the site speed. To combat performance issues, developers depend on the caching of a site. Caching tends to be tricky and even when done well, a cached, dynamic site is almost always significantly slower than a static site. This is because in a dynamic site, changes to a comment, global website setting, tag, category, or other content need to constantly be updated in the cache. However, with static, a URL will show the same HTML to any site visitor until the corresponding file is updated. This is why static sites almost always show an increase in performance and uptime vs. dynamic.

Static sites and modern browsers

When static sites first made their debut, the web browser was also in its infancy. Today’s browser, however, is much more mature and is capable of running full-fledged web applications on it’s own. That’s a huge benefit to static sites as it makes it easier to utilize web apps for comments on articles, social sharing of content, site search and more.

Static sites and CDNs

Unlike dynamic sites which may require some workarounds, static sites can easily be deployed directly to a CDN, like Amazon S3. This is an area where dotCMS shines as it allows users to get a static representation of their site and push publish it to Amazon S3 - speeding up the delivery of content for websites with high traffic and global reach.

Finding the happy medium

Before you jump straight into a static site, consider the business advantages and disadvantages of going static and what technology is best to use to generate your site.

Speed

As mentioned above, static sites are fast. There are no database queries to run, no templating, and no processing on every request, which speeds the site up significantly.

Security

When you run a static site, there are no software patch releases or version updates to worry about. While there are ways to “attack” a static site, they have nothing to do with your CMS software - everything is as safe as you can architect it!

Optimized version control - Hello retention & backups!

Whether it’s for disaster recovery or file management, version control within a static site is simple and effective.

Unlimited Scalability

A huge influx in traffic to a website can bog down the site, and can even render it almost useless. Static is better prepared to handle large amounts of web traffic as it consumes a very small amount of server resources.

Real-time content can be tricky

While static is great for speed and performance, it can make real-time content a tricky task. While some sites have found workarounds with JavaScript and other plugins, if your site depends heavily on real-time content, static may not be the right solution.

Static in today’s world

In the end, static sites are not right for every business. Some still rely on the real-time aspect of dynamic and its ability to immediately show template and other content changes. For these businesses, static doesn’t make sense. For others, however, static has come a long way from the beginning of the web and improves the speed, security, scalability, and performance of a website.

February 13, 2017

Recommended Reading

Headless CMS vs Hybrid CMS: How dotCMS Goes Beyond Headless

What’s the difference between a headless CMS and a hybrid CMS, and which one is best suited for an enterprise?

Why Global Brands Need a Multi-tenant CMS

Maintaining or achieving a global presence requires effective use of resources, time and money. Single-tenant CMS solutions were once the go-to choices for enterprises to reach out to different market...

14 Benefits of Cloud Computing and Terminology Glossary to Get You Started

What is cloud computing, and what benefits does the cloud bring to brands who are entering into the IoT era?