<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Peakhour.IO - WordPress</title><link href="https://www.peakhour.io/" rel="alternate"></link><link href="https://www.peakhour.io/feeds/tag/wordpress.atom.xml" rel="self"></link><id>https://www.peakhour.io/</id><updated>2023-11-02T13:00:00+11:00</updated><entry><title>Enterprise-Level Caching for All</title><link href="https://www.peakhour.io/blog/magento-2-plugin/" rel="alternate"></link><published>2023-11-02T13:00:00+11:00</published><updated>2023-11-02T13:00:00+11:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2023-11-02:/blog/magento-2-plugin/</id><summary type="html">&lt;p&gt;Elevate your e-commerce with our newly released Magento 2 plugin. Experience enterprise-level caching features accessible to all Peakhour customers.&lt;/p&gt;</summary><content type="html">&lt;p&gt;We've released our Magento 2 plugin for e-commerce stores using Magento. It brings Peakhour's caching features into
Magento, including capabilities that other providers often reserve for enterprise plans. With Peakhour,
'Enterprise for Everyone' means making those features available to all customers, regardless of plan.&lt;/p&gt;
&lt;h2&gt;Why Cache Tags Matter&lt;/h2&gt;
&lt;p&gt;&lt;a href="/learning/cache-tags/"&gt;Cache tags&lt;/a&gt; solve a practical website management problem: keeping your cache current when content changes.
In Magento 2, a single change, such as updating a product's price, can affect multiple pages. Cache tags ensure that only
the relevant cached content is updated, maintaining cache efficiency and reducing server load. That matters for
website speed and user experience, which directly affect sales and SEO rankings.&lt;/p&gt;
&lt;h2&gt;Enterprise for Everyone&lt;/h2&gt;
&lt;p&gt;While other providers offer cache tags only in expensive enterprise plans, Peakhour makes this feature available
to everyone. Our infrastructure and caching algorithms make that possible. We also offer other
enterprise-level features, including DDoS protection, real-time analytics, and custom caching rules, so
'Enterprise for Everyone' is reflected in the product rather than just the plan names.&lt;/p&gt;
&lt;h2&gt;Peakhour vs. Magento and Varnish Caching&lt;/h2&gt;
&lt;p&gt;Our plugin goes beyond Magento's built-in caching and Varnish cache in several ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Custom Cache Tags&lt;/strong&gt;: Unlike Magento's built-in cache, we offer custom cache tags for more granular cache control.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Advanced Algorithms&lt;/strong&gt;: Our caching algorithms go beyond Varnish, helping improve cache hit rates and lower server load.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Additional Features&lt;/strong&gt;: With Peakhour, caching sits alongside real-time analytics, DDoS protection, and custom caching rules, features often missing in standard Magento or Varnish setups.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Expected Performance Improvements&lt;/h2&gt;
&lt;p&gt;By using Peakhour's Magento 2 plugin, you can expect performance improvements:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Faster Page Loads&lt;/strong&gt;: Our caching can reduce page load times by up to 50%, giving users a smoother experience.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reduced Server Load&lt;/strong&gt;: Efficient caching means fewer requests to your origin server, reducing server load by as much as 70%.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Improved SEO&lt;/strong&gt;: Faster websites are favoured by search engines, which can improve SEO rankings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Higher Conversion Rates&lt;/strong&gt;: A faster website gives users a better experience, which can lead to higher conversion rates and increased sales.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Installation Options&lt;/h2&gt;
&lt;p&gt;You can install the Magento 2 plugin through Magento Connect, Composer, or a ZIP file. For
more detail, see our &lt;a href="/docs/how-to-guides/integrations/magento-2/"&gt;plugin page&lt;/a&gt;.&lt;/p&gt;</content><category term="CMS"></category><category term="Caching"></category><category term="Magento"></category><category term="CDN"></category><category term="Drupal"></category><category term="WordPress"></category><category term="Web Performance"></category></entry><entry><title>Useful tips to accelerate your Magento store</title><link href="https://www.peakhour.io/blog/accelerate-magento/" rel="alternate"></link><published>2023-11-01T13:00:00+11:00</published><updated>2023-11-01T13:00:00+11:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2023-11-01:/blog/accelerate-magento/</id><summary type="html">&lt;p&gt;There are many things you can do to speed up your Magento store, here are just a few.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Out of the box, Magento is not the fastest ecommerce platform. Magento 2 is built with Full Page Cache in mind, so repeat page requests do not always have to hit the application. A slow Magento store can frustrate customers, increase bounce rates, and cost sales. There are several practical ways to accelerate &lt;a href="/learning/ecommerce-security/securing-magento-shopify/"&gt;your Magento&lt;/a&gt; store and improve the user experience. These are good places to start.&lt;/p&gt;
&lt;h2&gt;Caching is King&lt;/h2&gt;
&lt;p&gt;Caching is usually the biggest performance lever for a Magento store. By storing pre-generated versions of pages, you reduce server response times and avoid asking Magento to rebuild the same page for every request.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Full Page Caching (FPC)&lt;/strong&gt;: Magento includes built-in FPC, but it can be extended. Varnish is a common choice for this role. Magento 2 has native support for Varnish, which acts as a web application accelerator.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Redis&lt;/strong&gt;: Use Redis for session and cache storage. It is an in-memory data structure store that can speed up backend operations by reducing database load.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Edge Caching&lt;/strong&gt;: Use Peakhour Edge to cache your dynamic pages close to users. This serves content from a nearby delivery path and reduces latency. Peakhour's &lt;a href="/docs/how-to-guides/integrations/magento-1/"&gt;Magento 1&lt;/a&gt; and &lt;a href="/docs/how-to-guides/integrations/magento-2/"&gt;Magento 2&lt;/a&gt; plugins make this straightforward to set up.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Optimise Your Images&lt;/h2&gt;
&lt;p&gt;Images often make up the bulk of a page's weight. Optimising them is one of the simplest ways to improve load times.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Compression&lt;/strong&gt;: Use image compression tools to reduce file sizes without a noticeable loss in quality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Next-Gen Formats&lt;/strong&gt;: Serve images in modern formats like WebP or AVIF, which offer better compression. A CDN can often handle this conversion automatically.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lazy Loading&lt;/strong&gt;: Implement lazy loading for images that are "below the fold" (not immediately visible). This means they only load when they are about to enter the user's viewport.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Minify and Merge CSS/JavaScript&lt;/h2&gt;
&lt;p&gt;Magento has built-in features for merging and minifying CSS and JavaScript files.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Minification&lt;/strong&gt;: Removes unnecessary characters (like whitespace and comments) from code to reduce file size.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Merging&lt;/strong&gt;: Combines multiple CSS or JavaScript files into a single file to reduce the number of HTTP requests.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Always test thoroughly after enabling merging, as it can sometimes cause issues with certain themes or extensions.&lt;/p&gt;
&lt;h2&gt;Keep Your Environment Updated&lt;/h2&gt;
&lt;p&gt;The environment your Magento store runs in has a direct effect on performance.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Latest PHP Version&lt;/strong&gt;: Use the latest stable version of PHP supported by your Magento version. Each new release brings performance and security improvements.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Server Resources&lt;/strong&gt;: Ensure your server has adequate RAM and CPU power to handle your traffic, especially during peak times.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Web Server&lt;/strong&gt;: Use a high-performance web server like Nginx, which is known for its speed and efficiency.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Use Edge Caching and Delivery&lt;/h2&gt;
&lt;p&gt;An edge delivery layer is a practical requirement for many ecommerce stores. It caches your static assets (images, CSS, JavaScript) close to users.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Reduced Latency&lt;/strong&gt;: Users receive content from the server geographically closest to them, which speeds up load times.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reduced Origin Load&lt;/strong&gt;: By serving cached content, an edge cache reduces the number of requests that hit your origin server, improving its performance and stability.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enhanced Security&lt;/strong&gt;: Peakhour also offers security features like a Web Application Firewall (WAF) and DDoS protection.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Database Optimisation&lt;/h2&gt;
&lt;p&gt;A slow database can slow the whole store.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Clean Logs&lt;/strong&gt;: Regularly clean out Magento's log tables (e.g., &lt;code&gt;log_customer&lt;/code&gt;, &lt;code&gt;log_visitor&lt;/code&gt;). These can grow very large and slow down database queries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enable Flat Catalog&lt;/strong&gt;: For Magento 1 and older versions of Magento 2, enabling the Flat Catalog for products and categories can improve performance by reducing the complexity of database queries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Re-index Regularly&lt;/strong&gt;: Keep your Magento indexes up to date. A cron job should be set up to handle this automatically.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Audit Third-Party Extensions&lt;/h2&gt;
&lt;p&gt;Poorly coded or unnecessary third-party extensions are a common cause of Magento performance issues.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Review Extensions&lt;/strong&gt;: Audit your installed extensions regularly. If you're not using one, disable or uninstall it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use a Profiler&lt;/strong&gt;: Use Magento's built-in profiler or a tool like New Relic to identify slow-running code, which can often be traced back to a specific extension.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These changes will not fix every Magento performance problem, but they cover the areas that usually matter first: cache behaviour, asset weight, the hosting environment, database maintenance, and extension overhead.&lt;/p&gt;</content><category term="CMS"></category><category term="Magento"></category><category term="Web Performance"></category><category term="Drupal"></category><category term="WordPress"></category><category term="Caching"></category><category term="CDN"></category></entry><entry><title>Introducing Automatic Cache Tags in the Updated Peakhour WordPress Plugin</title><link href="https://www.peakhour.io/blog/wordpress-plugin-cache-tags/" rel="alternate"></link><published>2023-03-20T13:00:00+11:00</published><updated>2023-03-20T13:00:00+11:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2023-03-20:/blog/wordpress-plugin-cache-tags/</id><summary type="html">&lt;p&gt;Read about automatic cache tags in the updated Peakhour WordPress plugin.&lt;/p&gt;</summary><content type="html">&lt;p&gt;We have updated the Peakhour WordPress plugin with automatic cache tag generation. The update is designed to help keep
cached WordPress content accurate without forcing full cache clears for routine content changes. We have also checked
compatibility with the latest versions of WordPress and PHP.&lt;/p&gt;
&lt;h2&gt;What are Cache Tags?&lt;/h2&gt;
&lt;p&gt;Cache tags are labels that CDNs such as Peakhour use to manage cached content more precisely. Instead of clearing the
whole cache when one page changes, you can purge only the content associated with the relevant tag. Visitors get the
updated content, while the rest of the site can continue to be served from cache.&lt;/p&gt;
&lt;h3&gt;A Cache Tag Example&lt;/h3&gt;
&lt;p&gt;Suppose you run a site with a home page, product pages, and blog articles. Without cache tags, updating one product page
or article may require clearing the entire cache. With cache tags, each part of the site can use its own tag, such as
"homepage," "product," and "blog." When you update content, you only need to purge the cache for the affected tag. That
means less unnecessary cache invalidation and a faster site for visitors.&lt;/p&gt;
&lt;h2&gt;Automatic Cache Tags in the Peakhour WordPress Plugin&lt;/h2&gt;
&lt;p&gt;The updated Peakhour WordPress plugin generates cache tags automatically for your site's content. When you update
content in the WordPress admin, the plugin sends the relevant purge requests to Peakhour. The result is more targeted
cache clearing without extra manual work.&lt;/p&gt;
&lt;h2&gt;How to Get Started with Automatic Cache Tags&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Update to the latest version of the Peakhour WordPress plugin.&lt;/li&gt;
&lt;li&gt;Follow the instructions to configure cache tags in the Peakhour admin.&lt;/li&gt;
&lt;li&gt;Flush your cache.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After that, the plugin generates cache tags and sends purge requests to Peakhour whenever you update content in the
WordPress admin.&lt;/p&gt;
&lt;h2&gt;Final Thoughts&lt;/h2&gt;
&lt;p&gt;Automatic &lt;a href="/learning/cache-tags/"&gt;cache tags&lt;/a&gt; in the Peakhour WordPress plugin make cache purging more precise. They
help improve performance, give you more flexibility, and reduce unnecessary cache clears. Try the updated plugin and let
us know how it works for you.&lt;/p&gt;</content><category term="CMS"></category><category term="Caching"></category><category term="CDN"></category><category term="Drupal"></category><category term="WordPress"></category><category term="Rate Limiting"></category></entry><entry><title>Drupal full page caching module</title><link href="https://www.peakhour.io/blog/drupal-purge-module/" rel="alternate"></link><published>2022-10-05T13:00:00+11:00</published><updated>2022-10-05T13:00:00+11:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2022-10-05:/blog/drupal-purge-module/</id><summary type="html">&lt;p&gt;We're excited to announce our Drupal 8/9 caching module, read on for more details.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Drupal is an open source content management system (CMS) widely used by Australian government websites. For example,
GovCMS is a customised version of Drupal. Peakhour now provides a purge module for Drupal 8/9, extending our
existing Drupal support.&lt;/p&gt;
&lt;p&gt;The Peakhour Purge module extends the Drupal Purge module. The Purge module provides a standardised way of
integrating third party CDNs, like Peakhour, with Drupal's native full page caching support.
Drupal's native support is suitable for small websites, but has a number of drawbacks. These drawbacks include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Doesn't support the Vary header.&lt;/li&gt;
&lt;li&gt;Is served by PHP, so it doesn't scale well.&lt;/li&gt;
&lt;li&gt;Runs on the same server as Drupal, so geographic latency is still an issue.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Peakhour's edge cache and delivery layer &lt;strong&gt;removes these issues before requests reach origin&lt;/strong&gt;, and also adds
&lt;strong&gt;image/content optimisation and website security.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Default Caching&lt;/h2&gt;
&lt;p&gt;Since version 8, Drupal has supported cache tags to provide efficient,
targeted invalidation of content for anonymous browser sessions. In this context, anonymous means a user that does
not have a Drupal Session cookie. Peakhour supports cache tags for all sites, a feature some competitors
reserve for 'Enterprise' plans.&lt;/p&gt;
&lt;p&gt;Cache tags are great, but another default setting is not. That setting is to add a:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Vary&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Cookie&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Header to the page response to make sure that logged-in users don't get cached pages. The Vary
header informs a cache that different content may be served from origin based on the value in the Cookie
header sent by the browser.&lt;/p&gt;
&lt;p&gt;This is fine if you are using Drupal with no third party javascript libraries. If you do
use third party libraries, it can render page caching close to useless. For example, drupal.org itself uses
perimeterx for bot detection, which results in a unique session cookie being set on the very first request.&lt;/p&gt;
&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/blog/drupal-org-first-request.jpg" width="100%" alt="The cookie set by perimiterx"/&gt;
&lt;em&gt;The first request to drupal.org results in a unique cookie being set by perimiterx&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;If you use Google analytics, Facebook, or any of a wide array of popular third party libraries, the same
thing can happen.&lt;/p&gt;
&lt;p&gt;This means only the &lt;strong&gt;very first&lt;/strong&gt; request from the user could be served from a general
page cache. Hit rates would be virtually zero.&lt;/p&gt;
&lt;h2&gt;Fix the Vary issue with Skip Cache on Cookie&lt;/h2&gt;
&lt;p&gt;Peakhour gives you a way to work around this. The first step is to disable the &lt;strong&gt;Vary: Cookie&lt;/strong&gt; header. Then, to
make sure any user with a Drupal Session bypasses the cache, use Peakhour's &lt;strong&gt;Skip Cache on Cookie&lt;/strong&gt; feature.
As soon as Drupal sets a session cookie, eg when someone logs in, Peakhour will pass requests through to the origin.
Full instructions on how to do this are provided on our &lt;a href="/docs/how-to-guides/integrations/drupal/"&gt;drupal module documentation&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;eCommerce Drupal sites&lt;/h2&gt;
&lt;p&gt;If you are running an ecommerce store, or some other type of site that
might serve customised information on a page, for example a mini cart with cart count/information,
then you will have to do custom development to continue caching pages.
A workaround for a mini cart would be to make it load via Ajax or to use local browser storage,
and &lt;strong&gt;Peakhour assists in making that happen&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Future features&lt;/h2&gt;
&lt;p&gt;Hopefully in the future Drupal will support setting its own cookie for varying the cache, in a similar manner to
Magento 2. eg X-Drupal-Vary, this would allow Peakhour to store multiple versions of a page to serve to different users.
For example, a user in Germany might get a version of a page in German with German currency.&lt;/p&gt;</content><category term="CMS"></category><category term="Drupal"></category><category term="Caching"></category><category term="CDN"></category><category term="Core Web Vitals"></category><category term="WordPress"></category><category term="Rate Limiting"></category></entry><entry><title>Prestashop 1.6/1.7 full page caching plugin released!</title><link href="https://www.peakhour.io/blog/prestashop-plugin/" rel="alternate"></link><published>2022-08-04T13:00:00+10:00</published><updated>2022-08-04T13:00:00+10:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2022-08-04:/blog/prestashop-plugin/</id><summary type="html">&lt;p&gt;Prestashop is the latest shopping cart we've made a plugin for, read on for more details.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Prestashop is a popular open source eCommerce platform written in PHP. We're releasing a Prestashop module that enables
full page caching through Peakhour. Pages can stay cached at the Peakhour edge for longer, and the plugin refreshes them
when the underlying content changes in Prestashop.&lt;/p&gt;
&lt;p&gt;&lt;a href="/blog/caching-dynamic-content-with-a-cdn/"&gt;Full Page Caching&lt;/a&gt; reduces load times by removing the time it takes for a
CMS to generate a dynamic page. That is typically around half a second for a quick page, and 3-5 seconds for a slow one.
Here is a cache miss and hit from our client fatburnersonly.com.au:&lt;/p&gt;
&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/blog/prestashop-cache-miss.jpg" width="100%" alt="Prestashop cache miss"/&gt;
&lt;em&gt;A typical cache miss on a category page. The origin has to generate the page, taking &lt;strong&gt;2.49 seconds&lt;/strong&gt;&lt;/em&gt;
&lt;/div&gt;

&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/blog/prestashop-cache-hit.jpg" width="100%" alt="Prestashop cache miss"/&gt;
&lt;em&gt;A cache hit: &lt;strong&gt;only 35.7 milliseconds&lt;/strong&gt; to deliver to the client from our edge&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Nearly 2.5 seconds removed from Time to First Byte and Largest Contentful Paint.&lt;/strong&gt; That's without changing
the site itself.&lt;/p&gt;
&lt;h3&gt;Tag Based Flushing&lt;/h3&gt;
&lt;p&gt;Like all our recent plugins, the Prestashop plugin adds a header with tag metadata for each cacheable page. This header is
called X-Prestashop-Tag and contains the IDs of the relevant entities on the page, eg products, categories, brands, pages,
etc. This metadata is stored alongside the cached page. When an entity changes in the Prestashop admin, eg a product price
is updated, the plugin issues a flush-by-tag request to Peakhour. Peakhour finds the pages with the associated tag and
invalidates them in the cache. The next request for the page passes through to origin and is then re-cached.&lt;/p&gt;
&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/blog/prestashop-tags.jpg" width="100%" alt="Prestashop full page caching headers"/&gt;
&lt;em&gt;Headers returned by the [caching plugin](/blog/opencart/opencart-3-caching-plugin/).&lt;/em&gt;
&lt;/div&gt;

&lt;h3&gt;Custom TTL&lt;/h3&gt;
&lt;p&gt;TTL (Time to live) is the time a resource stays in cache before the cache checks for a new version. You can control this
within the plugin. The plugin then sets the peakhour-cdn-cache-control header, part of the new
&lt;a href="/blog/cdn-cache-control-header/"&gt;cdn-cache-control specification&lt;/a&gt;, so only Peakhour responds to the cache directive.&lt;/p&gt;
&lt;h3&gt;Ajax Mini Cart&lt;/h3&gt;
&lt;p&gt;Mini carts are dynamic sections of eCommerce websites, and they often stop pages from being cacheable. The Peakhour plugin
loads them via Ajax so as many pages as possible remain cacheable.&lt;/p&gt;
&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/blog/prestashop-mini-cart.jpg" width="100%" alt="Prestashop mini cart"/&gt;
&lt;em&gt;The mini cart is in the top right; it is usually returned as part of the generated page.&lt;/em&gt;
&lt;/div&gt;

&lt;h3&gt;Cache varying&lt;/h3&gt;
&lt;p&gt;The same page can show different information depending on factors such as whether a user is logged in, or whether a
multicurrency store changes currency. The Peakhour Prestashop plugin handles this by changing a cookie value when those
factors change, creating separate cache regions for the different possibilities.&lt;/p&gt;
&lt;h2&gt;The Results&lt;/h2&gt;
&lt;p&gt;The Peakhour Prestashop plugin can improve store performance measurably. Our client fatburnersonly.com.au improved their
'good' web vitals scores by 20% in the two months they've been using Peakhour.&lt;/p&gt;
&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/blog/prestashop-lcp-improvements.jpg" width="100%" alt="Prestashop web vitals improvement"/&gt;
&lt;em&gt;Full page caching was enabled halfway through May. Note that a significant number of pages, eg checkout and admin, cannot be cached and are included in these stats&lt;/em&gt;
&lt;/div&gt;

&lt;h2&gt;Grabbing the plugin&lt;/h2&gt;
&lt;p&gt;If you have a slow Prestashop store, see our &lt;a href="/docs/how-to-guides/integrations/prestashop/"&gt;plugin page&lt;/a&gt; or
&lt;a href="/contact-us/"&gt;contact us&lt;/a&gt; for more information.&lt;/p&gt;</content><category term="CMS"></category><category term="Caching"></category><category term="Drupal"></category><category term="WordPress"></category><category term="Web Performance"></category><category term="CDN"></category><category term="Core Web Vitals"></category></entry><entry><title>Opencart 3 Full Page Caching Plugin Released</title><link href="https://www.peakhour.io/blog/opencart-3-plugin/" rel="alternate"></link><published>2022-03-25T13:00:00+11:00</published><updated>2022-03-25T13:00:00+11:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2022-03-25:/blog/opencart-3-plugin/</id><summary type="html">&lt;p&gt;Elevate your Opencart 3 store's performance with Peakhour's full page caching plugin. Learn how our features outperform LiteSpeed and Varnish Cache.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Peakhour's Opencart plugin includes features that are usually reserved for enterprise plans with other providers. It follows our 'Enterprise for Everyone' approach in a practical way:&lt;/p&gt;
&lt;h3&gt;Tag-Based Flushing&lt;/h3&gt;
&lt;p&gt;Peakhour's plugin records metadata for each Opencart page in the cache. When you update a product or category, only the relevant pages are refreshed. That keeps cache flushing targeted instead of clearing more content than necessary.&lt;/p&gt;
&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/blog/opencart-3-full-page-caching-headers.jpg" width="100%" alt="Opencart 3 [full page](/blog/drupal/drupal-purge-module/) caching headers"/&gt;
&lt;em&gt;Headers returned by caching plugin.&lt;/em&gt;
&lt;/div&gt;

&lt;h3&gt;Custom TTL&lt;/h3&gt;
&lt;p&gt;Control how long a resource stays in the cache before it checks for a new version. This gives you a direct way to manage cache freshness.&lt;/p&gt;
&lt;h3&gt;Ajax Mini Cart and Wishlist&lt;/h3&gt;
&lt;p&gt;Dynamic sections like mini carts and wishlists usually prevent caching. The plugin loads these sections via Ajax, which makes more pages cacheable.&lt;/p&gt;
&lt;h3&gt;Cache Vary&lt;/h3&gt;
&lt;p&gt;The plugin adapts to different user states, currencies, and languages. It changes a cookie value to create separate cache regions for these variables.&lt;/p&gt;
&lt;h2&gt;Peakhour vs. LiteSpeed and Varnish Cache&lt;/h2&gt;
&lt;p&gt;LiteSpeed and Varnish Cache are good options, but Peakhour offers a more flexible and efficient caching solution for Opencart. The plugin makes Opencart as cache-friendly as Magento 2 or Drupal 8, if not more so.&lt;/p&gt;
&lt;h2&gt;The Results Speak for Themselves&lt;/h2&gt;
&lt;p&gt;Our client saw a clear improvement in their web vitals scores and website scalability. Full &lt;a href="/blog/prestashop-plugin/"&gt;page caching&lt;/a&gt; was enabled in October, with the gains shown below.&lt;/p&gt;
&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/blog/opencart-3-web-vitals-lcp-improvement.jpg" width="100%" alt="Opencart 3 web vitals improvement"/&gt;
&lt;em&gt;Full page caching was enabled in October. Note a significant amount of pages, eg checkout, admin etc cannot be cached which affects these stats&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;&lt;em&gt;For more information, visit our &lt;a href="/docs/how-to-guides/integrations/opencart-3/"&gt;plugin page&lt;/a&gt; or &lt;a href="/contact-us/"&gt;contact us&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;</content><category term="CMS"></category><category term="Caching"></category><category term="CDN"></category><category term="Drupal"></category><category term="Web Performance"></category><category term="WordPress"></category><category term="Magento"></category></entry><entry><title>Website Optimisation</title><link href="https://www.peakhour.io/blog/eliminating-blocking-resources/" rel="alternate"></link><published>2021-05-17T13:00:00+10:00</published><updated>2021-05-17T13:00:00+10:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2021-05-17:/blog/eliminating-blocking-resources/</id><summary type="html">&lt;p&gt;Even if you have the fastest server in the world, your website might still seem very slow to end users if you have lots of render blocking resources, learn how to deal with them.&lt;/p&gt;</summary><content type="html">&lt;p&gt;We've previously covered ways to find &lt;a href="https://www.peakhour.io/blog/common-issues-that-impact-site-speed/#blocking"&gt;resources that block rendering in a browser&lt;/a&gt;.
Now we'll cover techniques for loading those resources without letting them block rendering. Before making changes,
always run some &lt;a href="/blog/introduction-to-website-performance-testing/"&gt;website performance tests&lt;/a&gt;
using your favourite testing tool to get a baseline so you can measure any improvements. We recommend
&lt;a href="/blog/testing-website-speed-webpagetest/"&gt;testing with webpagetest.org&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Before we get into the techniques, it is worth defining the problem.&lt;/p&gt;
&lt;h2&gt;What is a Blocking Resource?&lt;/h2&gt;
&lt;p&gt;When a browser loads a page from a website it reads the HTML markup from top to bottom. If it
encounters a CSS or JavaScript file while it&amp;apos;s reading, the browser stops while it downloads and parses
that file. While the browser is waiting it can’t process the rest of the HTML or display
content to the user. Rendering is blocked.&lt;/p&gt;
&lt;h2&gt;Why is this a problem?&lt;/h2&gt;
&lt;p&gt;It would not be a problem if every page included only the information required to display it. Most websites do not work that way.
They are typically built using prebuilt themes and third-party libraries that can contain lots of
CSS and JavaScript. Only a tiny fraction of this code might be used on the current page, or it might only be needed for ‘below the fold’
content, or on another page of the site. &lt;strong&gt;Note: Below the fold means the content of a page that
doesn't initially fit on the screen&lt;/strong&gt;. Any unnecessary information keeps the browser blocked for longer than
needed, slowing the load experience for the user.&lt;/p&gt;
&lt;p&gt;CSS and JavaScript files are usually at the very top of the HTML document before any of the content. This means they
have to be downloaded and parsed before the browser can display anything. Even a website that has extremely fast server response
times can still seem very slow if it has blocking resources.&lt;/p&gt;
&lt;p&gt;Take a simple example: a website that includes a live chat widget. The JavaScript for the widget is
included at the very top of the page in the &lt;head&gt; section. The browser has to stop, download, and parse the CSS
and JavaScript for the widget (usually downloaded from a third-party domain) before any content is displayed to the user.
The chat widget could appear after the rest of the content without affecting the user experience.&lt;/p&gt;
&lt;h2&gt;Things you should always be doing&lt;/h2&gt;
&lt;p&gt;Before targeting CSS- or JavaScript-specific techniques, cover the basics for both.&lt;/p&gt;
&lt;h3&gt;1. Minify all files&lt;/h3&gt;
&lt;p&gt;Minification is the removal of all non-essential characters in a file, e.g. irrelevant whitespace and code comments. It
can make a substantial difference to the file size.&lt;/p&gt;
&lt;h3&gt;2. Ensure compression is enabled on your server&lt;/h3&gt;
&lt;p&gt;Make sure your server is configured to use either gzip or Brotli compression when serving CSS and JavaScript.&lt;/p&gt;
&lt;h3&gt;3. Self host files&lt;/h3&gt;
&lt;p&gt;If the CSS or JavaScript is on a third-party domain, i.e. not the domain name your website is on, you should strongly
consider uploading the file to your website and serving it from your domain. This might not always be possible, but if it
is it eliminates the overhead of the browser
opening a connection to another domain, and it removes the possibility that the third party is not compressing, minifying,
or using HTTP/2.&lt;/p&gt;
&lt;p&gt;After the implementation of &lt;a href="https://www.peakhour.io/blog/cache-partitioning-firefox-chrome/"&gt;cache partitioning in the major browsers&lt;/a&gt;,
there is no longer any &lt;em&gt;potential&lt;/em&gt; advantage to using third-party CDNs to serve assets like JavaScript, fonts, or CSS. Make a copy on your server and host
them on your domain.&lt;/p&gt;
&lt;h3&gt;4. If you can't self host then preconnect to third party domains&lt;/h3&gt;
&lt;p&gt;If external assets are on third-party domains, and you absolutely can't self host them, then you can improve
loading by telling the browser to &lt;code&gt;preconnect&lt;/code&gt; to the third-party domain.&lt;/p&gt;
&lt;p&gt;Using &lt;code&gt;preconnect&lt;/code&gt; tells the browser to establish an early connection to the domain before it has discovered the asset
while reading the HTML. Use &lt;code&gt;preconnect&lt;/code&gt; in the head of the HTML, e.g.:&lt;/p&gt;
&lt;p&gt;&lt;link rel="preconnect" href="https://example.com"&gt;&lt;/p&gt;
&lt;p&gt;Establishing early connections can shave 100-500ms off third-party load times, which is worth having. You should only use
&lt;code&gt;preconnect&lt;/code&gt; on critical third-party resources. For all the others you can use &lt;code&gt;dns-prefetch&lt;/code&gt;, e.g.:&lt;/p&gt;
&lt;p&gt;&lt;link rel="dns-prefetch" href="http://example.com"&gt;&lt;/p&gt;
&lt;p&gt;This tells the browser to perform DNS resolution of the domain early, which is similar to looking up a phone number
in the phone book. Pre-resolving DNS can save 20-120ms. That sounds like small numbers, but remember, &lt;a href="/website-performance/"&gt;differences as small
as 100ms can have large measurable impacts on conversion rates&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;5. Select only what you need from frameworks&lt;/h3&gt;
&lt;p&gt;It is common for users of frameworks like Bootstrap or jQuery UI to only use a fraction of the functionality provided.
If this is you, then the first step is to cut out what you're not using. Bootstrap and jQuery UI are modular, you can
either download everything in one bundle, or you can break it up to take just the bits you are using.&lt;/p&gt;
&lt;p&gt;These points will ensure that blocking resources are downloaded as quickly as possible. Now we can discuss some
specific techniques that will help minimise blocking and get your page displaying quickly. Please be aware that
this is not an exhaustive overview, but these techniques will probably get you 90% of the benefit with 10% of the work.
Getting that last 10% requires deeper technical work. If you want to go there, Google’s web.dev
website is a good resource.&lt;/p&gt;
&lt;h2&gt;Techniques for Optimising Blocking Resources&lt;/h2&gt;
&lt;h3&gt;Javascript&lt;/h3&gt;
&lt;p&gt;There are a few different techniques for optimising the loading of JavaScript. First, let's look at the default
loading behaviour. &lt;em&gt;Credit for the images goes to Daniel Imms and his website Growing with the web&lt;/em&gt;. As stated earlier,
the default behaviour is to stop parsing the HTML document when a script is encountered, download the script and execute it.&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/javascript-loading-legend.png" alt="Javascript loading legend" width="100%""/&gt;
&lt;img src="/static/images/blog/default-javascript-blocking-behaviour.png" alt="Default Javascript loading behaviour" width="100%"/&gt;&lt;/p&gt;
&lt;p&gt;Now let's look at how we can change this behaviour.&lt;/p&gt;
&lt;h4&gt;1. Moving scripts to the very bottom of the page, right before the closing &lt;/body&gt; tag.&lt;/h4&gt;
&lt;p&gt;This is the original optimisation technique, before defer and async were introduced. It works by moving scripts to
the very end of the HTML document, where they are downloaded and parsed after everything else.&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/javascript-loading-end-of-html.png" alt="Javascript end of page load" width="100%""/&gt;&lt;/p&gt;
&lt;p&gt;In our example in the previous section, the chat widget would now load and pop up after the rest of the content has been displayed to the user.&lt;/p&gt;
&lt;h4&gt;2. Defer and Async&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags that have a &lt;code&gt;src&lt;/code&gt; attribute can be marked as either deferred &lt;code&gt;defer&lt;/code&gt;, or asynchronous &lt;code&gt;async&lt;/code&gt;, or both.
For example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;script src=”https://www.somedomain.com/somescript.js” defer async&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This tells the browser to change the script loading behaviour.&lt;/p&gt;
&lt;h4&gt;Defer&lt;/h4&gt;
&lt;p&gt;Defer was the original browser-based support for improved JavaScript loading. It tells the
browser to download the script asynchronously while it keeps reading the HTML, and then execute it once it has finished reading the whole HTML document. Here's the loading behaviour
with defer enabled.&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/javascript-loading-defer.png" alt="Javascript loading defer" width="100%""/&gt;&lt;/p&gt;
&lt;p&gt;As you can see the script no longer blocks the browser from doing anything else while downloading. Defer preserves
script execution order. This can be very important if a script depends on one declared earlier in the page.&lt;/p&gt;
&lt;p&gt;As noted earlier, you can only mark &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags that have a &lt;code&gt;src&lt;/code&gt; attribute as deferred. Inline scripts, e.g.:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;console.log(&amp;quot;Hi&lt;span class="w"&gt; &lt;/span&gt;I&amp;#39;m&lt;span class="w"&gt; &lt;/span&gt;some&lt;span class="w"&gt; &lt;/span&gt;inline&lt;span class="w"&gt; &lt;/span&gt;script!&amp;quot;);
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Any attempt to defer that inline block will simply be ignored. This can cause problems if you have inline script scattered through your code
and rely on a deferred third-party library, e.g. jQuery. There are two potential solutions if you can't simply move the
code to the bottom of the page:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Move each inline code block into its own file and include it using the &lt;code&gt;src&lt;/code&gt; attribute so you can defer it.&lt;/li&gt;
&lt;li&gt;Or you can try declaring the block as a &lt;code&gt;module&lt;/code&gt;. Test this carefully, as browser support may be limited and it also
   places the script into &lt;code&gt;strict&lt;/code&gt; mode, which may break it.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;Async&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;async&lt;/code&gt; attribute tells the browser to download the script now and execute it as soon as it has finished. Like &lt;code&gt;defer&lt;/code&gt;, the
downloading is done asynchronously. Unlike &lt;code&gt;defer&lt;/code&gt;, the script is executed as soon as it is downloaded. Here is the behaviour:&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/javascript-loading-async.png" alt="Javascript loading async" width="100%""/&gt;&lt;/p&gt;
&lt;p&gt;As you can see the browser doesn't stop while downloading, but does pause once downloading is finished so it can execute
the script. &lt;strong&gt;&lt;code&gt;async&lt;/code&gt; doesn't preserve script order&lt;/strong&gt;, which can potentially cause issues when there are script dependencies.&lt;/p&gt;
&lt;p&gt;All three methods have pros and cons. &lt;code&gt;Defer&lt;/code&gt; and &lt;code&gt;async&lt;/code&gt; result in faster page loads overall as the scripts are downloaded
while the browser reads the HTML. Moving the script to the bottom of the page shifts the sequence around.&lt;/p&gt;
&lt;p&gt;Your first option should be to &lt;code&gt;defer&lt;/code&gt; all scripts. Then, if some above the fold content is taking too long because it has a
JavaScript dependency, e.g. a carousel in the hero section, you can try making the necessary scripts &lt;code&gt;async&lt;/code&gt; instead.&lt;/p&gt;
&lt;h3&gt;Optimising CSS&lt;/h3&gt;
&lt;p&gt;The key to fast CSS loading is to prioritise the CSS needed for the immediate above the fold content and then defer
the rest. Many articles advocate extracting the precise CSS and then including it inline
in the HTML document in a style block, i.e.:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;style&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;.accordion-btn&lt;span class="w"&gt; &lt;/span&gt;{background-color:&lt;span class="w"&gt; &lt;/span&gt;#ADD8E6;color:&lt;span class="w"&gt; &lt;/span&gt;#444;cursor:&lt;span class="w"&gt; &lt;/span&gt;pointer;padding:&lt;span class="w"&gt; &lt;/span&gt;18px;width:&lt;span class="w"&gt; &lt;/span&gt;100%;border:&lt;span class="w"&gt; &lt;/span&gt;none;text-align:&lt;span class="w"&gt; &lt;/span&gt;left;outline:&lt;span class="w"&gt; &lt;/span&gt;none;font-size:&lt;span class="w"&gt; &lt;/span&gt;15px;transition:&lt;span class="w"&gt; &lt;/span&gt;0.4s;}.container&lt;span class="w"&gt; &lt;/span&gt;{padding:&lt;span class="w"&gt; &lt;/span&gt;0&lt;span class="w"&gt; &lt;/span&gt;18px;display:&lt;span class="w"&gt; &lt;/span&gt;none;background-color:&lt;span class="w"&gt; &lt;/span&gt;white;overflow:&lt;span class="w"&gt; &lt;/span&gt;hidden;}h1&lt;span class="w"&gt; &lt;/span&gt;{word-spacing:&lt;span class="w"&gt; &lt;/span&gt;5px;color:&lt;span class="w"&gt; &lt;/span&gt;blue;font-weight:&lt;span class="w"&gt; &lt;/span&gt;bold;text-align:&lt;span class="w"&gt; &lt;/span&gt;center;}
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;However, you have to do this on every possible landing page where the critical CSS might be different per page. Inlining
CSS also adds to the download size for each page, and forces the browser to reparse the CSS rules for every load rather
than being able to use a cached file for repeat views.&lt;/p&gt;
&lt;p&gt;We advocate for putting the critical CSS into its own file and loading that normally, and then deferring any other non
critical CSS. Identifying the critical CSS is the main task. The first thing to do is to look at the included
CSS on your website and see if you can identify any non-core files. You can defer those files using this pattern:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;as=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;style&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;/styles.css&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;onload=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;this.onload=null;this.rel=&amp;#39;stylesheet&amp;#39;&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;noscript&amp;gt;&amp;lt;link&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;stylesheet&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;/styles.css&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/noscript&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;as="style"&lt;/code&gt; lets the browser download the file asynchronously. The onload changes the type to stylesheet, telling the
browser to parse the file. Finally, we include a &lt;code&gt;&amp;lt;noscript&amp;gt;&lt;/code&gt; to enable the CSS to load normally if JavaScript is turned off.&lt;/p&gt;
&lt;p&gt;Once you've deferred non-core CSS files you can still check whether your core ones contain lots of unused rules.
Google Chrome's coverage tool can show unused rules, but it
doesn’t let you easily export used and unused rules. You have to go through it yourself, programmatically, or use
a third-party tool to make two files: the critical CSS, and the non-critical CSS which can be deferred.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Eliminating, or at least minimising, blocking resources can be one of the biggest improvements to user experience you can make to your
site. With &lt;a href="/blog/web-vitals/"&gt;Google Web Vitals&lt;/a&gt; being introduced soon as a search signal, it is important
to make sure your website loads as fast as possible so your users stay longer and buy more
from your site.&lt;/p&gt;</content><category term="Performance"></category><category term="Web Performance"></category><category term="Caching"></category><category term="Drupal"></category><category term="Rate Limiting"></category><category term="WordPress"></category><category term="Core Web Vitals"></category></entry><entry><title>Secure Dynamic Content Caching</title><link href="https://www.peakhour.io/blog/caching-dynamic-content-with-a-cdn/" rel="alternate"></link><published>2021-02-09T13:00:00+11:00</published><updated>2021-02-09T13:00:00+11:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2021-02-09:/blog/caching-dynamic-content-with-a-cdn/</id><summary type="html">&lt;p&gt;Comprehensive guide to secure dynamic content caching that improves server performance whilst maintaining security controls. Learn how modern application security platforms integrate caching with threat protection for optimal performance-security balance.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Last time we covered how &lt;a href="/blog/common-issues-that-impact-site-speed/#slow" target="issues"&gt;slow server performance&lt;/a&gt; can
have a negative, sometimes &lt;strong&gt;very&lt;/strong&gt; negative, effect on your website load times. The causes of slow server responses
are many and varied, and not necessarily tied to the server specification. Diagnosing and dealing with them can be difficult,
time-consuming, and costly. One practical way to reduce the impact is to look for opportunities to cache
&lt;a href="/learning/dynamic-content-caching/"&gt;dynamic content&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;What is Dynamic Content?&lt;/h2&gt;
&lt;p&gt;Content delivered by a web server is categorised as either static or dynamic. Static content is the same for every user
and is delivered without being generated or processed by the server. Static content is fast to deliver
and does not tax a server's resources.&lt;/p&gt;
&lt;p&gt;Dynamic content is generated by the server for every request. That can involve querying a database several times and executing
a large amount of code. Depending on the work required to generate the result, dynamic content can be resource-heavy.&lt;/p&gt;
&lt;p&gt;Traditionally CDNs have only cached and served the static content of websites, usually the images, CSS files,
Javascript files, etc. They required the webmaster to upload these resources to the CDN's servers and to modify their website
source HTML to access the resources from the CDN. For example,&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;https://www.yourdomain.com/image1.jpg
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;would be changed to be something like&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;https://cdn.yourdomain.com/image1.jpg
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Modern CDNs, like Peakhour, act as a reverse proxy{:target="learning"}, which means they sit between the
end user and the website's origin server. This enables them to &lt;em&gt;transparently&lt;/em&gt; cache a copy of &lt;em&gt;anything cacheable&lt;/em&gt; being returned by the
origin server. By transparently caching, we mean the caching happens without changes to the original website.&lt;/p&gt;
&lt;h3&gt;Full Page Caching&lt;/h3&gt;
&lt;p&gt;Full Page Caching (FPC) is where the actual HTML document of a web page is cached.&lt;/p&gt;
&lt;p&gt;Most websites are built using a Content Management System (CMS). Widely used CMS platforms are Wordpress,
Drupal, Magento, etc. By default, every time a page is viewed the CMS has to generate the content
from its database. Most of the time this generation is unnecessary. The content is either the
same for every user, changes very rarely, or only differs by a small amount of personalisation. In each case it
is possible to perform Full Page Caching to improve page load times and to cut server load. Let's have a look at the
difference full page caching makes to one of our clients, Magento 2 store &lt;a href="/case-studies/savvysupporter/"&gt;savvysupporter.com.au&lt;/a&gt;.&lt;/p&gt;
&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/savvy-before.jpg" width="100%" alt="Savvysupporter before"/&gt;
&lt;em&gt;Main document load &lt;strong&gt;before&lt;/strong&gt; caching: &lt;strong&gt;2.07s&lt;/strong&gt;&lt;/em&gt;
&lt;/div&gt;

&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/savvy-after.jpg" width="100%" alt="Savvysupporter after"/&gt;
&lt;em&gt;Main document load &lt;strong&gt;after&lt;/strong&gt; caching: &lt;strong&gt;82ms!!&lt;/strong&gt;&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;Caching the page has cut nearly &lt;strong&gt;2 whole seconds&lt;/strong&gt; from the download time. That matters: load differences
as small as 100 milliseconds have measurable impacts on website conversion rates. With a Magento 2
website, it's possible to cache all full pages outside the checkout process and the customer/admin area. This can reduce load
on the origin in the order of &lt;strong&gt;60-70%&lt;/strong&gt; and make the customer experience much better.&lt;/p&gt;
&lt;h3&gt;API (Application Programming Interface) Caching&lt;/h3&gt;
&lt;p&gt;Many API calls used by web applications are for the retrieval of information to be displayed to the end user. Examples
 include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pricing and product information&lt;/li&gt;
&lt;li&gt;Form auto completion&lt;/li&gt;
&lt;li&gt;Product catalogue searches&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are all strong candidates for caching, reducing load on your server and making websites faster.&lt;/p&gt;
&lt;h2&gt;Handling Stale Information&lt;/h2&gt;
&lt;p&gt;The one potential drawback of caching dynamic content is the possibility of returning out of date information to the
end user. There are two strategies to deal with this risk.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Setting a short Time To Live (TTL) with the caching provider&lt;/strong&gt;. By only keeping content cached for a short time, e.g. 5
   minutes, the cache will never be without up to date information for very long. Cached content will expire and the new
   version fetched from the origin server. The drawback with this method is that, unless your site is very busy, cache hit
   rates can be low, users can frequently get slow loading pages, and stale content is still possible. However, for very
   busy sites this can be an effective, low-overhead strategy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Flushing content when it changes&lt;/strong&gt;. This strategy sets very long time to live in the cache, months or even years. When
   content is updated the cache is informed and the new version fetched. This notification of new content could happen
   manually or, in the case of some CMSs, automatically. For example, Magento 2 and Drupal 8 have a built in framework
   for integrating caching providers to handle flushing when content/stock changes. This strategy ensures very high hit
   rates, but unless the flushing is accurate and fast it can result in stale content.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Security-Performance Integration&lt;/h2&gt;
&lt;p&gt;Modern &lt;a href="/learning/application-security/what-is-application-security-platform/"&gt;Application Security&lt;/a&gt; platforms like Peakhour combine caching with comprehensive security controls so performance optimisation does not weaken application protection:&lt;/p&gt;
&lt;h3&gt;Edge Security Processing&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;WAF/WAAP Integration&lt;/strong&gt;: Security rules are processed at the edge before content is cached, ensuring malicious requests never reach your origin&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bot Management&lt;/strong&gt;: Caching adapts based on traffic classification - legitimate users benefit from cached content whilst malicious bots are filtered out&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API Protection&lt;/strong&gt;: Secure caching of API responses with appropriate security headers and access controls&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Cache Security Controls&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Secure Purging&lt;/strong&gt;: Authorised cache invalidation through secure API endpoints with proper authentication&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Content Classification&lt;/strong&gt;: Different caching policies for public, authenticated, and sensitive content&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Header Security&lt;/strong&gt;: Automatic injection of security headers (CSP, HSTS, etc.) into cached responses&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Secure dynamic &lt;a href="/products/advanced-caching/"&gt;content caching&lt;/a&gt; works best when performance optimisation and application security are handled together. By implementing caching within an Application Security Platform, organisations can achieve:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Superior Performance&lt;/strong&gt;: Dramatic improvements in load times and server capacity&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enhanced Security&lt;/strong&gt;: Protection against threats at the edge before they impact cached content&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operational Efficiency&lt;/strong&gt;: Reduced origin server load whilst maintaining security posture&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost Optimisation&lt;/strong&gt;: Lower infrastructure costs through intelligent caching and edge processing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For modern applications and APIs, secure dynamic caching should form part of the performance and security strategy, improving the user experience whilst maintaining threat protection.&lt;/p&gt;</content><category term="Performance"></category><category term="Drupal"></category><category term="Caching"></category><category term="WordPress"></category><category term="Web Performance"></category><category term="CDN"></category><category term="Rate Limiting"></category></entry><entry><title>Common Issues That Affect Website Performance</title><link href="https://www.peakhour.io/blog/common-issues-that-impact-site-speed/" rel="alternate"></link><published>2020-11-30T13:00:00+11:00</published><updated>2020-11-30T13:00:00+11:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2020-11-30:/blog/common-issues-that-impact-site-speed/</id><summary type="html">&lt;p&gt;After covering testing we're going to get an overview of the common issues that impact website load times and how to check for them.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Our last three website performance articles covered the why and how of
&lt;a href="/blog/introduction-to-website-performance-testing/"&gt;testing website performance&lt;/a&gt;,
and introduced our two favourite performance testing tools, &lt;a href="/blog/testing-website-speed-webpagetest/"&gt;WebPageTest.org&lt;/a&gt;, and
&lt;a href="https://www.peakhour.io/blog/testing-sitespeed-lighthouse/"&gt;Lighthouse&lt;/a&gt;. This article covers the common causes of slow
loading times, and how to spot them using the same testing tools.&lt;/p&gt;
&lt;h2&gt;1. Latency&lt;/h2&gt;
&lt;p&gt;Latency is the time it takes for a request from a client's browser to traverse the internet to reach the website server.
A number of factors affect latency, with physical distance usually the main one.
Data on the internet travels at the speed of light, so distance may not sound like a major concern.
In practice, small delays compound quickly. Here are some realistic examples of request
latency:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sydney to Melbourne: 5ms&lt;/li&gt;
&lt;li&gt;Sydney to Perth: 25ms&lt;/li&gt;
&lt;li&gt;Sydney to San Francisco: 75ms&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Common tools used to determine latency between servers are Ping and Traceroute, they will provide you with
&lt;strong&gt;Request Round Trip (RTT)&lt;/strong&gt; latency, ie the time it takes for a request to get to the server and back. So 2 times the numbers above.&lt;/p&gt;
&lt;p&gt;Here is an example of latency during a webpage load. We'll ignore internet speed and any potential
network congestion, and focus only on latency. We'll request a website hosted in San Francisco from a
browser located in Sydney.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Browser establishes a TLS (Secure) connection with server, &lt;em&gt;6 * 75ms&lt;/em&gt; = &lt;strong&gt;450ms&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Browser sends HTTP Request for the main page = &lt;strong&gt;75ms&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Server sends HTTP Response containing page which specifies 10 assets = &lt;strong&gt;75ms&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Browser requests the 10 additional assets = &lt;strong&gt;75ms&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Server responds with 10 assets &lt;em&gt;10 * 75&lt;/em&gt; = &lt;strong&gt;750ms&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In this example, a website with 10 assets, which is a fairly simple page, has nearly &lt;strong&gt;1.5s&lt;/strong&gt; added to
the page load time through latency alone. If the same site was hosted in Melbourne, the time due to latency would be just
&lt;strong&gt;95ms&lt;/strong&gt;. To solve this problem you would either move your website server closer to your customers, or use Peakhour Edge caching.&lt;/p&gt;
&lt;h3&gt;How do I check for latency problems?&lt;/h3&gt;
&lt;p&gt;If there is a long distance between your server and your customers, eg your website is hosted in the US and your customers
are in Australia, page load times will be significantly affected by latency. A good tool for indicative RTT times between cities is
provided by &lt;a href="https://wondernetwork.com/pings"&gt;wonder network&lt;/a&gt;. Webpagetest.org also provides a Traceroute tool which
can give you indicative RTT times between its testing locations and your website.&lt;/p&gt;
&lt;h2&gt;2. Old version of HTTP&lt;/h2&gt;
&lt;p&gt;Browsers communicate with websites using a protocol called HTTP. The protocol formalises the steps needed to connect a
browser and server so a webpage can be downloaded. Since the introduction of the web, HTTP has gone through
a number of revisions. The currently widely adopted version is HTTP/2.&lt;/p&gt;
&lt;p&gt;Even though HTTP/2 was introduced over 5 years ago, over &lt;a href="https://w3techs.com/technologies/details/ce-http2" target="trends"&gt;50% of websites&lt;/a&gt;
are still only served over HTTP/1.1. Without getting too technical, HTTP/2 has significant advantages over older versions
because it reduces the number of connections between a browser and server, and transfers information more efficiently.&lt;/p&gt;
&lt;p&gt;Serving your website over HTTP/2 can improve page load times by &lt;strong&gt;10-15%&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;How do I identify the version of HTTP my website is served over?&lt;/h3&gt;
&lt;p&gt;&lt;a href="/blog/testing-website-speed-webpagetest/" target="testing"&gt;Run a performance test of your website&lt;/a&gt; using WebPageTest.org, once complete
click on the 'Details' link in the report navigation. You will see the Waterfall View. Click on the first request, circled
below in this image:&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/http2-waterfall.jpg" alt="Webpagetest waterfall view" style="width: 100%;margin-bottom: 20px"/&gt;&lt;/p&gt;
&lt;p&gt;It will bring up the request details including the Protocol used, circled below:&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/request-detail-http2.jpg" alt="HTTP Request Detail" style="width: 100%;margin-top: 20px"/&gt;&lt;/p&gt;
&lt;h2&gt;3. &lt;a name="slow"&gt;&lt;/a&gt; Slow Server Performance&lt;/h2&gt;
&lt;p&gt;A slow initial response from the server is a common cause of poor page load
performance. The majority of websites are built using some sort of Content Management System (CMS), eg Wordpress, Magento,
Drupal, Shopify, to name a few. By default, a CMS has to construct a page each time a browser requests it, even when the
content has not changed. That process can involve executing a lot of code and querying a database several times
before returning the HTML that forms the page.&lt;/p&gt;
&lt;p&gt;The specification of your server, the number of CMS plugins, the state of your database, and the number of simultaneous
users can all affect the response time. A slow server may take 10s or more to respond, while even a fast server can still take over
a second to generate a page. That is enough to pretty much make you fail the new Core Web Vitals guidelines before you even
get started.&lt;/p&gt;
&lt;h3&gt;How do I check for slow server performance?&lt;/h3&gt;
&lt;p&gt;Server performance can be checked from the waterfall view in WebPageTest.org. The time taken to download the main document
indicates whether server performance is affecting your page load. Here's an example:&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/server-performance-waterfall.jpg" alt="Server Performance Waterfall" style="width: 100%"/&gt;&lt;/p&gt;
&lt;p&gt;The total time taken to download the main document here is over 1.3s. That is not too bad, but it has already used up over half
the 2.5s required to achieve 'Good' for the Largest Contentful Paint (LCP) metric in &lt;a href="/blog/web-vitals/" target="webvitals"&gt;web vitals&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;4. Page Weight&lt;/h2&gt;
&lt;p&gt;Even though internet speeds are getting faster, they are still a limiting factor to how fast a browser can download a page.
If the requested page and the associated resources, eg images, javascript, CSS, are large files, it will take longer
for the browser to download all the required information to display a page. Unoptimised images are a common culprit
for inflating page weight. Unoptimised CMS themes and third party javascript libraries are another.&lt;/p&gt;
&lt;h3&gt;How do I check my page weight?&lt;/h3&gt;
&lt;p&gt;WebPageTest.org reports the page weight in the far right of its summary, circled here:&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/page-weight.jpg" alt="Page Weight" style="width: 100%"/&gt;&lt;/p&gt;
&lt;p&gt;You should be aiming for 2mb or less. This particular website is more than a little obese, coming in at around 30mb...
WebPageTest also has a section called 'Content Breakdown' which shows where the weight is, ie in images, javascript, etc.&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/content-breakdown.jpg" alt="Content Breakdown" style="width: 100%"/&gt;&lt;/p&gt;
&lt;p&gt;Over 27mb in images is what's weighing down this page.&lt;/p&gt;
&lt;p&gt;Peakhour also has a &lt;a href="https://www.peakhour.io/pages/page-weight" target="pageweight:"&gt;pageweight tool&lt;/a&gt; that you
can run for a page on your website and receive a full optimisation report for the images on the page, along with downloadable
optimised images.&lt;/p&gt;
&lt;h2&gt;5. &lt;a name="blocking"&gt;&lt;/a&gt;Blocking Resources&lt;/h2&gt;
&lt;p&gt;Resources that can block a page include CSS and javascript. When the main HTML page is downloaded and parsed, the browser
will not render anything to the screen until the CSS and javascript files that are referenced are downloaded and parsed.
If your website includes a lot of CSS and javascript, which is not uncommon for pre built themes for CMS's like Wordpress
and Magento, the downloading and parsing of these files can delay the browser from showing any content for several
seconds.&lt;/p&gt;
&lt;h3&gt;How do I identify blocking resources?&lt;/h3&gt;
&lt;p&gt;The easiest way to check is to use &lt;a href="/blog/testing-sitespeed-lighthouse/"&gt;Google Lighthouse&lt;/a&gt;) to identify them for you.
After running the report, go to the opportunities section and expand the 'Eliminate render-blocking resources' section
to see what it finds.&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/lighthouse-opportunities.jpg" alt="Lighthouse Opportunities" style="max-width: 100%"/&gt;&lt;/p&gt;
&lt;h2&gt;6. Third Party Resources&lt;/h2&gt;
&lt;p&gt;It is very common for websites to include third party resources. These are files that have to be fetched
from a domain/url other than the one that the page is being requested on. Eg if you are requesting www.domain.com.au,
it might include a resource from a third party, eg www.anotherdomain.com.au. Common third party resources might be
analytics scripts (eg Google analytics), marketing tools (eg Mailchimp)&lt;/p&gt;
&lt;p&gt;This forces the browser to open another connection to the third party. The time taken to do this, combined with the possibility
that the third party might be slow to respond (see latency and server performance above), can often ruin load times. If the
resource in question is also a blocking resource the problem is compounded.&lt;/p&gt;
&lt;h3&gt;Spotting a problem with third party resources&lt;/h3&gt;
&lt;p&gt;WebPageTest has a section 'Domains' which displays all the individual domains that the browser connected to when loading
the page:&lt;/p&gt;
&lt;p&gt;&lt;img src="/static/images/blog/third-party.jpg" alt="Lighthouse Opportunities" style="max-width: 100%"/&gt;&lt;/p&gt;
&lt;p&gt;If your website is requesting resources from more than 10 separate domains then you should consider why that is happening
and whether they are necessary. If you are using external CDNs to load javascript or CSS then you should probably
move them onto your domain.&lt;/p&gt;
&lt;p&gt;Social sharing plugins are notorious for pulling in a lot of resources from external domains. You should replace any share
buttons using external scripts with simple static buttons. It is simple to do, and your website will be much smaller and
faster. By using the javascript shares that social sites prescribe, you are slowing down your website
and allowing third parties to track your clients across the internet.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;There are many factors that can slow down your website, drive away customers, and cost you money. You have to regularly
&lt;a href="/blog/introduction-to-website-performance-testing/"&gt;test your website&lt;/a&gt; to check for issues and address them when you find
them. Next we'll cover what you can do to fix the issues we've mentioned here.&lt;/p&gt;</content><category term="Performance"></category><category term="Web Performance"></category><category term="CDN"></category><category term="Caching"></category><category term="Core Web Vitals"></category><category term="WordPress"></category><category term="Rate Limiting"></category></entry><entry><title>WordPress Performance Optimisation</title><link href="https://www.peakhour.io/blog/wordpress-performance-optimisation-security-cdn/" rel="alternate"></link><published>2019-05-27T13:00:00+10:00</published><updated>2019-05-27T13:00:00+10:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2019-05-27:/blog/wordpress-performance-optimisation-security-cdn/</id><summary type="html">&lt;p&gt;How to speed up WordPress by separating public cacheable pages from private, expensive, and abused request paths.&lt;/p&gt;</summary><content type="html">&lt;p&gt;WordPress speed problems are usually request-path problems. A public article, product page, or campaign landing page should not make PHP, plugins, and the database rebuild the same HTML for every visitor. A login attempt, checkout session, admin request, or private API call should not be treated like public content just because the site is under load.&lt;/p&gt;
&lt;p&gt;The job is to separate those paths clearly. Cache what can be reused, protect the routes that are expensive or abused, and keep enough evidence to prove that the change improved the visitor experience without hiding origin risk.&lt;/p&gt;
&lt;h2&gt;Start With Public Page Caching&lt;/h2&gt;
&lt;p&gt;Most WordPress sites have a large set of pages that are dynamic only because WordPress generated them. The content itself is public and often identical for many visitors: posts, pages, category archives, product listings, campaign pages, media assets, CSS, and JavaScript. These are the paths where full-page caching and edge delivery can change the result quickly.&lt;/p&gt;
&lt;p&gt;When a public page is served from cache, the browser avoids the long trip to origin and the origin avoids running WordPress for a repeat response. That can move Time to First Byte and Largest Contentful Paint in the right direction before anyone touches the theme. Peakhour's older full-page caching examples showed the practical size of this change: a Magento main document fell from 2.07 seconds before caching to 82 ms after caching. WordPress sites have different internals, but the same pattern applies when anonymous pages are safe to reuse.&lt;/p&gt;
&lt;p&gt;The cache policy should be route-aware, not blanket. A simple operating model looks like this:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;WordPress path&lt;/th&gt;
&lt;th&gt;Delivery stance&lt;/th&gt;
&lt;th&gt;What to check&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Posts, pages, category pages, campaign pages&lt;/td&gt;
&lt;td&gt;Cache publicly with tags and purge controls&lt;/td&gt;
&lt;td&gt;Confirm logged-out content is shared and fresh after publishing.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Featured images, media library files, theme assets&lt;/td&gt;
&lt;td&gt;Cache and optimise variants&lt;/td&gt;
&lt;td&gt;Track image weight, format, dimensions, and cache hit state.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WooCommerce product and category pages&lt;/td&gt;
&lt;td&gt;Cache when no cart/session dependency changes the response&lt;/td&gt;
&lt;td&gt;Keep stock, price, and promotion purges tied to content changes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cart, checkout, account, previews, admin&lt;/td&gt;
&lt;td&gt;Bypass shared cache&lt;/td&gt;
&lt;td&gt;Preserve session privacy and correctness.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;wp-login.php&lt;/code&gt;, &lt;code&gt;/wp-admin/&lt;/code&gt;, &lt;code&gt;xmlrpc.php&lt;/code&gt;, sensitive plugin endpoints&lt;/td&gt;
&lt;td&gt;Protect and rate-limit before origin&lt;/td&gt;
&lt;td&gt;Keep noisy automation away from PHP workers and admin paths.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Publishing Should Not Clear the Whole Site&lt;/h2&gt;
&lt;p&gt;Caching WordPress is easy until someone edits content. Clearing the whole cache after every post update is safe in the narrow sense, but it damages hit ratio and pushes avoidable traffic back to origin. During a busy publishing period or campaign, that can make the site slower exactly when fresh content is being promoted.&lt;/p&gt;
&lt;p&gt;Cache tags are a better fit. Tags label cached responses by the content or template they depend on, so a post update can purge the post, related archives, and affected modules without invalidating unrelated pages. The updated Peakhour WordPress plugin generates cache tags automatically and sends purge requests when content changes in the WordPress admin. That lets teams set longer cache lifetimes for public content while still publishing with confidence.&lt;/p&gt;
&lt;p&gt;This is where &lt;a href="/products/advanced-caching/"&gt;advanced caching&lt;/a&gt; becomes operational rather than theoretical. The site team can review which tags were purged, which routes stayed cached, and whether the next request was a hit, miss, or stored response.&lt;/p&gt;
&lt;h2&gt;Images and Browser Work Still Matter&lt;/h2&gt;
&lt;p&gt;Page caching improves the start of the request path. It does not fix a 3 MB hero image, missing image dimensions, unused CSS, or a third-party script that blocks rendering. WordPress themes and plugin stacks often ship CSS and JavaScript for features that are not used on the current page. The browser still has to download and parse that code before it can paint useful content.&lt;/p&gt;
&lt;p&gt;Use Lighthouse to find render-blocking resources and main-thread pressure. Use WebPageTest to see whether the main HTML arrived quickly but the filmstrip still stayed blank while CSS, fonts, scripts, or images loaded. Those are different failures, and they need different fixes.&lt;/p&gt;
&lt;p&gt;For images, the best results usually come from serving the right variant rather than only compressing the original. &lt;a href="/products/image-optimisation-and-transformation/"&gt;Peakhour image optimisation&lt;/a&gt; can generate AVIF or WebP outputs, choose responsive sizes, and cache the resulting variants. That helps LCP when the largest visible element is an image, and it helps CLS when dimensions are kept stable.&lt;/p&gt;
&lt;p&gt;For CSS and JavaScript, remove unused files where possible, defer non-critical scripts, self-host critical third-party assets when practical, and reserve &lt;code&gt;preconnect&lt;/code&gt; for third-party domains that genuinely affect the first view. Moving every script later can break dependencies, so test the actual page type rather than applying a generic rule across the whole theme.&lt;/p&gt;
&lt;h2&gt;Protect Expensive WordPress Paths&lt;/h2&gt;
&lt;p&gt;Performance and security meet at origin capacity. Login floods, XML-RPC abuse, aggressive crawlers, scraper traffic, and noisy plugin endpoints can consume PHP workers and database connections that should be serving real visitors. If those requests are filtered only after WordPress has loaded, the site can look like it has a speed problem when it really has an unsorted traffic problem.&lt;/p&gt;
&lt;p&gt;For WordPress, protection should be specific. &lt;code&gt;wp-login.php&lt;/code&gt;, &lt;code&gt;/wp-admin/&lt;/code&gt;, &lt;code&gt;xmlrpc.php&lt;/code&gt;, the REST API, and plugin-specific endpoints should have their own bot, WAAP, and rate-limit policy. WooCommerce needs separate handling again: public catalogue pages can often be cached, but cart, checkout, account, and payment paths must stay dynamic and private.&lt;/p&gt;
&lt;p&gt;This does not mean putting heavy checks in front of every visitor. It means making edge decisions before origin work: allow clean public page requests, serve cache hits, challenge or rate-limit suspicious login traffic, bypass cache for private sessions, and log what happened.&lt;/p&gt;
&lt;h2&gt;Measure the Outcome&lt;/h2&gt;
&lt;p&gt;The evidence should line up across tools. WebPageTest should show a faster main document on cache hits, fewer slow origin fetches, and a waterfall where critical resources are visible early. Lighthouse should show fewer render-blocking opportunities and less main-thread pressure. Core Web Vitals should move where the page had the relevant bottleneck: LCP for slow HTML or heavy hero media, CLS for unstable layout, and INP for JavaScript and interaction work.&lt;/p&gt;
&lt;p&gt;Peakhour evidence should add the delivery side: cache hit ratio, miss causes, purge state, &lt;code&gt;Cache-Status&lt;/code&gt;, image savings, shielded misses, blocked login or XML-RPC abuse, and origin request volume. That combination tells the site team whether WordPress is faster because visitors received lighter pages from the edge, because abusive traffic stopped draining origin, or because browser work was reduced.&lt;/p&gt;
&lt;p&gt;Fast WordPress is not a plugin list. It is a set of clear route decisions backed by before-and-after measurements.&lt;/p&gt;</content><category term="Performance"></category><category term="WordPress"></category><category term="Drupal"></category><category term="Core Web Vitals"></category><category term="Rate Limiting"></category><category term="Web Performance"></category><category term="Application Security"></category></entry><entry><title>Boost Your Website Speed with Full Page Caching</title><link href="https://www.peakhour.io/blog/magento-1-plugin/" rel="alternate"></link><published>2019-05-10T13:00:00+10:00</published><updated>2023-11-02T13:00:00+11:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2019-05-10:/blog/magento-1-plugin/</id><summary type="html">&lt;p&gt;Our Magento 1 plugin is now available in the Magento Store. Discover how it improves website performance and capability.&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;a href="/blog/opencart/opencart-3-caching-plugin/"&gt;Full page&lt;/a&gt; caching is not a cosmetic optimisation. Users expect quick load times, and search engines reward fast websites with higher rankings. Full page caching supports both by storing fully rendered HTML pages, so the server does not have to rebuild the page from scratch for each visitor.&lt;/p&gt;
&lt;h2&gt;How Full Page Caching Enhances Performance and Capability&lt;/h2&gt;
&lt;p&gt;By caching full HTML pages, you create a snapshot of a page at a particular moment. When a user requests that page, the server can deliver the snapshot instead of generating the page again. This saves compute and database resources, allowing your server to handle more users simultaneously. The result is straightforward: faster load times for users and less strain on the server.&lt;/p&gt;
&lt;h3&gt;Real-World Impact&lt;/h3&gt;
&lt;p&gt;Our early adopters have reported clear improvements in &lt;a href="/blog/wordpress-plugin/"&gt;website speed&lt;/a&gt; and server performance. One client saw a 40% reduction in server load and a 20% increase in page load speed. Those results point to a better user experience and potentially higher conversion rates.&lt;/p&gt;
&lt;h2&gt;Challenges with Magento 1 and How We Solved Them&lt;/h2&gt;
&lt;p&gt;Magento 1 presents specific challenges for full &lt;a href="/blog/opencart-3-plugin/"&gt;page caching&lt;/a&gt;, and our plugin handles them directly.&lt;/p&gt;
&lt;h3&gt;Mini Cart Issue&lt;/h3&gt;
&lt;p&gt;The mini cart needs to show real-time data, which makes it a barrier to full page caching. Our plugin uses targeted AJAX calls to fetch this data only when required, reducing unnecessary load on the server.&lt;/p&gt;
&lt;h3&gt;Form Key Problem&lt;/h3&gt;
&lt;p&gt;Magento 1 uses form keys to prevent CSRF attacks, but those keys make caching difficult. Our plugin replaces form keys with a strict referrer check, which is secure and cache-friendly.&lt;/p&gt;
&lt;h3&gt;Additional Features&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Automatic Expires Headers&lt;/strong&gt;: You do not need to manually set expiration times for your cache; our plugin does it for you.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cache Tagging&lt;/strong&gt;: This allows for precise cache management. When you update a product, only the relevant cached pages are flushed, keeping the process efficient.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The plugin is available for download, with the aim of improving performance and increasing server capability on Magento 1 stores.&lt;/p&gt;</content><category term="CMS"></category><category term="Caching"></category><category term="Web Performance"></category><category term="Drupal"></category><category term="WordPress"></category><category term="CDN"></category><category term="Core Web Vitals"></category></entry><entry><title>Boost Your Website Speed with Peakhour's Full Page Caching</title><link href="https://www.peakhour.io/blog/wordpress-plugin/" rel="alternate"></link><published>2019-04-02T13:00:00+11:00</published><updated>2019-04-02T13:00:00+11:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2019-04-02:/blog/wordpress-plugin/</id><summary type="html">&lt;p&gt;Experience a significant boost in website speed and performance with Peakhour's Full Page Caching feature, now easily accessible through our Wordpress plugin.&lt;/p&gt;</summary><content type="html">&lt;h2&gt;Why Full Page Caching Matters&lt;/h2&gt;
&lt;p&gt;Site speed affects user experience, conversion, and server load. Slow pages can increase bounce rates and cost revenue. &lt;a href="/blog/opencart/opencart-3-caching-plugin/"&gt;Full Page&lt;/a&gt; Caching improves response times by storing and serving static versions of dynamic pages. This reduces load on your server and gives visitors quicker page loads.&lt;/p&gt;
&lt;h2&gt;How Peakhour Optimises Your Site&lt;/h2&gt;
&lt;p&gt;Peakhour helps speed up and secure your website with a DNS change. Unlike basic caching solutions, Peakhour serves these static pages from its global ANYCast network. Your site's visitors download content from a server close to them, reducing latency and speeding up downloads.&lt;/p&gt;
&lt;h2&gt;Peakhour's Transparent Caching and Delivery&lt;/h2&gt;
&lt;p&gt;In addition to Full Page Caching, Peakhour can act as a transparent delivery and cache layer. It caches and optimises static assets like CSS, JavaScript, and images. You don't need to make any other changes to your site; a DNS change is all it takes.&lt;/p&gt;
&lt;h2&gt;Wordpress Plugin for Easy Integration&lt;/h2&gt;
&lt;p&gt;During our beta phase, many clients used early versions of our WordPress plugin. The plugin integrates with Peakhour's API to automate content flushing when you make edits in the WordPress admin panel. This simplifies publishing and allows you to set longer lifetimes for your dynamic content in our global cache.&lt;/p&gt;
&lt;h2&gt;Improved Performance Metrics&lt;/h2&gt;
&lt;p&gt;With Peakhour, sites can see faster download times, a higher cache hit rate, and reduced load on the origin server. Site owners get lower origin demand; visitors get faster pages.&lt;/p&gt;</content><category term="CMS"></category><category term="Caching"></category><category term="Web Performance"></category><category term="WordPress"></category><category term="Drupal"></category><category term="CDN"></category><category term="Rate Limiting"></category></entry></feed>