Web Caching (or HTTP Caching) became one of the most important techniques to increase a websites’ performance and one of the most effective ways to improve the user experience of their visitors. It is also part of the core content delivery strategy implemented within the HTTP protocol.
Let's go through the basic concepts of web content caching and see how this is helping EXADS to ensure super fast delivery of ads.
The online user experience can have a direct impact on your brand, it can help you grow your online business or halt its growth. There are some specific components that can ensure you are providing a great user experience and Web Caching is a very important factor for optimized performance.
When serving ads, the end user experience should be seamless. With an optimized ad zone auction, serving the ad to the ad zone should take a minimum load time to show the ad to the user. Web Caching can be used to help optimize performance and it has the following advantages:
A slow load time of an ad served on a website is a big cause of user frustration. This causes the following issues: the user abandons the website before the ad is served, resulting in a lost user for the website's Advertisers who have bid for the various ad zones on the website’s page; their ads will not be seen by the end user. This can affect the relationship of the website publisher with the ad network serving the ad.
The speed at which a webpage loads is crucial in ensuring a good digital experience. Google ranks websites that are fast to load higher and so Web Caching can be key in reducing load times.
The instant availability of a website's content to end users across the world is an important component to user experience. A site may not load for a user because the network may be prone to frequent interruptions or the site may be experiencing intermittent outages. In such cases, Web Caching will cover this by still serving end users the cached content.
The internet handles huge amounts of data and manages heavy traffic 24/7 and as a result, bandwidth congestion can be an issue on major networks affecting load times. Network congestion can be greatly reduced with Web Caching, because the path traveled in fetching the content is cut short when it’s cached. Since all the requests are not directed towards the origin, it frees up the network and reduces the load on the origin server, helping it serve non-cached content faster.
EXADS SaaS uses Web Caching to ensure clients of its white labeled ad server technology can offer an optimized service, ensuring clients can continue to grow their business and provide a world class end user experience.
Caching is the term for storing reusable responses to make subsequent requests faster by having them available. There are many different types of caching available, each of which has its own characteristics.
Web Caching, however, is a different type of cache. It is a core design feature of the HTTP protocol meant to minimize network traffic while improving the perceived responsiveness of the system as a whole.
"Caching is a technique that stores a copy of a given resource and serves it back when requested. When a web cache has a requested resource in its store, it intercepts the request and returns a copy of the stored resource instead of redownloading the resource from the originating server."
Source: HTTP caching, MDN Web Docs
With no Web Cache in place, every request will reach the server until it eventually responds (even though it didn’t change from the last request), as seen in the following diagram.
This means that repeat visitors have to re-download the same files every time. That's a massive waste of bandwidth. On the other hand, with the Cache set, this only happens during the first request.
There are a few terms that are important to note and some might be unfamiliar. Some of the more common ones are:
Content can be cached at many different points throughout the delivery chain, such as:
Web browsers themselves maintain a small cache. Typically, the browser sets a policy that determines which resources should be saved. This type of cache is incredibly useful since the information is stored in the computer, allowing an instant load when accessing it.
This storage, also called Proxy Cache, is done on the proxy server, between the client and the origin server. This is a type of shared cache as it serves multiple clients (browsers).
Usually, proxy servers are distributed all over the world, placing the content closer to the users and preventing time-consumption requests from opposite sides of the globe, reducing latency and network traffic.
The majority of caching behavior is determined by the caching policy, which is set by the content owner. These policies are mainly articulated through the use of specific HTTP headers.
The ones we find more appropriate to pay attention to are:
Several different policies can be set using this header. Some of the Cache-Control options that can be used to dictate content’s caching policy are:
These can be combined in different ways to achieve various caching behavior.
We care about our publishers’ websites and we strongly believe that serving ads shouldn’t compromise their website’s performance. With this in mind, the following constraints are applied for all the snippets we serve.
Although unrelated to cache, this allows us to send the same amount of functionality but using less network bandwidth.
This constraint has become a standard practice for page optimization and, in some cases, it can reduce the file size by as much as 30%.
We use a CDN Proxy cache with 99.7% availability distributed across the globe, with availability in Europe, North America, South America, Asia, and Oceania.
Our origin servers are also distributed across the globe, enabling the intermediary to fetch the resource almost immediately.
Usually, the HTML parsing process (a process done by the Browser to interpret the code and render the page accordingly) looks like this:
The parsing is paused until the script is fetched and executed, then resuming the parsing again.
When using the async attribute, the script is completely independent, and now the parsing flow would look like this:
We support async scripts, allowing parallel download while the browser is parsing the page, to be executed as soon as it is available.
Our snippets are regularly maintained to offer different features. This allows publishers to not need to update them and almost immediately see new changes from our Ad Server.
As explained in a previous point, this acts as a fingerprint of the content, preventing unnecessary network bandwidth.
If we analyze a publisher’s website using our snippets on PageSpeed Insights, we might see Google complaining about a small cache policy applied to our snippet.
This is causing some discussion (https://github.com/GoogleChrome/lighthouse/issues/11380) around the Lighthouse project (used by PageSpeed Insights) about their policy being too strict. The threshold used by this audit will require a cache duration of at least 96.5 days.
We, at EXADS, decided to not lose the fast-update opportunity for publishers and keep using 3h for TTL.
We hope that this article has given you a clearer understanding of the caching process and why EXADS SaaS is able to provide a super fast ad serving solution for our clients.
Web Developer since 2011. Currently leading a Squad in EXADS.
Subscribe to receive via email more information about EXADS and the ad serving market.
We’re making 2023 the year of EXADS with some powerful new features on our Q1 Roadmap. We're talking Ad Format Configurations, Smart Bidding and Bid Shading, User Profiling and more!
Come meet EXADS at the TES Affiliate Conferences, at Cascais Portugal, on 22-25 February 2023.
We look at key ad tech trends for 2023 and examine the opportunities and challenges ahead. What is the future of ad tech in 2023 and beyond?