We love hearing from customers who successfully increase their website’s performance. Recently, we noticed one website see such a dramatic improvement that we had to ask for more details. The secret? He switched his site from a PHP site to a static site built with static website generator Jekyll.
Jekyll is certainly not the only site generator option. Netlify has a great article going over a few of their favorites. However, the results speak for themselves. Time to ‘Page Complete’ was cut dramatically – more than half depending on the region!
But sure, that’s one just one random example. What larger websites are utilizing this? Do they get the same results?
Check out this video, where Mathias Biilmann talks about his realization that bringing the Smashing Magazine website over from WordPress to a static site using the JAMstack and Netlify hosting would make it load around 6 times faster!
So is that the magic bullet? Everyone should just use a static site generator and experience incredible speed increases? Unfortunately, it’s not quite that simple.
Whether or not you should use this method depends entirely on how your site will be used. To get a better sense of whether a static generator tool is right for you, let’s examine their advantages and disadvantages, and enable you to pick the tool that’s best for you.
What Is A Static Site Generator (SSG)?
A static site is exactly what it sounds like – a fixed and locked-in website. It can, of course, be changed by the developer, but after it is built and stored on a server, it gets sent to your visitors exactly the same way until it’s updated.
Dynamic sites, on the other hand, are constantly making round trips to a database to update the content that a visitor is served. Take a WordPress blog page for example. You write the blog post in WordPress, but you don’t have to go to the Blog page and put your new post on the page. The next time a visitor navigates to your Blog page, a round trip is made to check the database for any new posts, and the page is built on the fly, displaying the new post.
With the growing fondness for the simplicity of a static site, many tools have popped up with the intention of making the process easier. An SSG is exactly that. They take your input files (mostly HTML) and generate a static site for you to upload to the hosting provider. Some of the better providers even do this for you, making it a seamless process.
Advantages of Using a Static Website Generator
Unlike dynamic sites that require many roundtrips to the database to build each page, static sites only need to find the static page that a visitor requests and serve it to them. Since the pages are pre-rendered, they don’t need to be processed on the server level, saving additional time.
All of this to say, static websites are often significantly faster than dynamic websites.
For the same reasons Static sites load so quickly, they also scale really well to handle large spikes in traffic. Without having to query the database and render pages dynamically, static sites can serve the page to a large surge of traffic with virtually no slow down.
There are also added security benefits to using a static site, especially when compared to a CMS. WordPress can suffer from vulnerabilities in the database, plugins, and WordPress Core. The problem gets worse if the owner doesn’t keep on top of maintenance and updates. With no database, attacks like SQL database injections aren’t a threat to an SSG site.
Disadvantages of Using a Static Website Generator
So if using an SSG typically results in much faster page load times, why isn’t everyone using one?
Well for one, creating a site this way isn’t very novice-friendly. It helps to be a fairly advanced developer as you’ll need to be comfortable with Markup and the command line to get the ball rolling. Similarly, there’s no dashboard or content management system that many are accustomed to. Since this is a fairly emerging market, there are fewer resources and documentation as well.
Many developers are also turned off by the lack of server-side functionality. This is because things like user log-ins, contact forms, and search functionality require a database and are subsequently not available on a true static site. As SSG gain in popularity, there are third-party solutions that are being created that address this. However, this further increases the build complexity.
So Is A Static Site Right For You?
There are obviously some incredible advantages to using a static site versus a dynamic option. When paired with great hosting and a CDN, static sites are incredibly fast. Security also becomes more important with each passing year, and a static website earns top marks there as well.
If you prefer to use a CMS dashboard to have control over your website or prefer to build with a WYSIWYG editor, a static site likely won’t work for you. Any large websites with thousands of pages also might find a static option to be too difficult to manage.
However, if your website is serving as an informational hub for your business, that doesn’t require a lot of server-side functionality, you might find that a static site suits your needs well!
Even e-commerce sites have options to use static sites. Using the JAMstack, product descriptions and images can be static resources, while prices and the shopping cart can be dynamically served. And as we’ve covered before, page load time can greatly impact your e-commerce revenue!
If the need for more advanced development skills makes you hesitate, many of the better SSG options offer step-by-step documentation that walks you through the entire process.
Have you used a static website generator, or are considering the option? Let us know below. We’d love to hear about your experience!
Are you using Speedy Site?
Website speed optimization with speedy.site ensures your WordPress site is loading fast throughout the day, around the world, and on various devices as well as passing Google's code web vitals.