<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Http on Varnish Cache</title><link>https://www.varnish.org/docs/tutorials/tags/http/</link><description>Recent content in Http on Varnish Cache</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 22 Mar 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://www.varnish.org/docs/tutorials/tags/http/index.xml" rel="self" type="application/rss+xml"/><item><title>HTTP caching basics</title><link>https://www.varnish.org/docs/tutorials/http-caching-basics/</link><pubDate>Tue, 09 Nov 2021 00:00:00 +0000</pubDate><guid>https://www.varnish.org/docs/tutorials/http-caching-basics/</guid><description>&lt;p&gt;It&amp;rsquo;s important to understand HTTP caching because at some point an HTTP cache will protect your web platform from going down. Whether this HTTP cache is a reverse caching proxy like Varnish or a full-blown CDN, you need to understand the rules of the game, and you need to understand the basics of HTTP caching.&lt;/p&gt;
&lt;p&gt;Luckily there are conventions for this. There are even standardized headers that are part of HTTP&amp;rsquo;s specification that will allow you to control the behavior of a web cache.&lt;/p&gt;</description></item><item><title>Avoiding HTTP to HTTPS redirect loops in Varnish</title><link>https://www.varnish.org/docs/tutorials/avoid-http-to-https-redirect-loops-varnish/</link><pubDate>Tue, 22 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.varnish.org/docs/tutorials/avoid-http-to-https-redirect-loops-varnish/</guid><description>&lt;p&gt;When your force HTTP to HTTPS redirection in your web server or web application and cache the output, you might get stuck in a redirect loop. Your browser may present the following error message as a result:&lt;/p&gt;
&lt;p&gt;&lt;img
 src="https://www.varnish.org/images/tutorials/redirect-loop-browser-error.jpg"
 alt="Redirect loop error message"
 class="standalone-image"
/&gt;&lt;/p&gt;
&lt;p&gt;Behind the scenes, your browser will receive a &lt;code&gt;301 Moved Permanently&lt;/code&gt; status code and your browser will follow the URL from the &lt;code&gt;Location&lt;/code&gt; header:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-http" data-lang="http"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#cf222e"&gt;HTTP&lt;/span&gt;&lt;span style="color:#0550ae"&gt;/&lt;/span&gt;&lt;span style="color:#0550ae"&gt;1.1&lt;/span&gt; &lt;span style="color:#0550ae"&gt;301&lt;/span&gt; Moved Permanently
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Location&lt;span style="color:#0550ae"&gt;:&lt;/span&gt; https://example.com/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Content-Length&lt;span style="color:#0550ae"&gt;:&lt;/span&gt; 226
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Content-Type&lt;span style="color:#0550ae"&gt;:&lt;/span&gt; text/html; charset=iso-8859-1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;X-Varnish&lt;span style="color:#0550ae"&gt;:&lt;/span&gt; 2
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Age&lt;span style="color:#0550ae"&gt;:&lt;/span&gt; 0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Via&lt;span style="color:#0550ae"&gt;:&lt;/span&gt; 1.1 varnish
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Despite using an &lt;code&gt;https://&lt;/code&gt; URI scheme, the origin server will continue to issue redirects and you&amp;rsquo;re in fact stuck in a redirect loop. This loop continues until your browser gives up, at which point the error message will appear.&lt;/p&gt;</description></item><item><title>Object lifetimes: TTL, Grace, Keep</title><link>https://www.varnish.org/docs/tutorials/object-lifetimes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.varnish.org/docs/tutorials/object-lifetimes/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;If you landed on this page it is very likely that you are familiar with Varnish and you know it improves content delivery performance
by storing a copy of your content in cache, and every request thereafter is fulfilled by cached content.
Every copy of the content (&lt;em&gt;aka object&lt;/em&gt;) stored in cache has a lifetime that defines how long an object can be considered fresh,
or live, within the cache.&lt;/p&gt;</description></item></channel></rss>