A big part of making sure that websites run quickly is the use of caching and CDNs (content delivery networks).


Caching


Imagine someone visits https://webinology.io from their browser. A server (a special kind of computer that lives in the cloud) receives that request. Because it's a WordPress website, the server builds the page at that very moment and then sends it back to the visitor's browser. That takes time... usually not a lot of time, but then, people also won't wait very long on a slow website.


Page caching is technology that makes a copy of the page that WordPress and the server built and then stores it for the next visitor. This means that the next visitor - and the next, and so on - gets their page a lot faster, but it's the page that was generated back when that first user stopped in.


Content Delivery Networks (CDN)


A CDN is a special kind of cloud environment used to house "assets" - images, videos, and certain types of code like CSS (Cascading Style Sheets) and JavaScript. CDNs use many servers in different geographical regions to make sure that these static assets can be delivered to browsers quickly. For this to happen, the files from your website need to be shipped to the CDN, and that only happens periodically. Much like a cache, a CDN can cause your visitors to see what your page looked like two hours ago even though you've just updated it.


Asset Minification


Those things that we often store on a CDN - we call them "asset" files - often get some special treatment themselves. For instance, a block of JavaScript code might be written like this:


(function( $ ) {
  'use strict';

  $( window ).load(function() {
    $("#copybutton").click(function() {
      let copyText = document.getElementById('copytext');

      copyText.focus();
      copyText.select();

      document.execCommand("copy");

      alert("The value '" + copyText.value + "' has been copied to your clipboard.");
    });
  });
})( jQuery );


That's great for humans, but when you're sending it over the Internet, it's faster if it gets turned into something like this:


(function($){'use strict';$(window).load(function(){$("#copybutton").click(function(){let copyText=document.getElementById('copytext');copyText.focus();copyText.select();document.execCommand("copy");alert("The value '"+copyText.value+"' has been copied to your clipboard.");});});})(jQuery);


That's called "asset minification," and it's pretty important. You may have already guessed, but these minified files get stored too... and a change to the current code might not immediately show up in the minified, cached, CDN-deployed files that your visitors see.


Fast is almost always more important


When it comes to websites, speed is critical in the difference between a user hitting your front page and leaving in three seconds (a "bounce" in web terms) and staying to view more of your site.


If you find yourself in the spot where you've made changes to your site and need them to be there now (like when you left that one critical zero off the end of your sale price), then open a ticket with us. We can flush out everything and make sure that your site is showing the updated content as quickly as possible.