Compare commits

..

No commits in common. "eac5573121d3caafb9fab21eef471364edcbdfd9" and "afbba7e3440a680e6de11a7cd12134b0e753ca3c" have entirely different histories.

24 changed files with 104 additions and 418 deletions

View File

@ -1,39 +0,0 @@
+++
date = '2024-11-15T22:33:10+01:00'
draft = false
title = 'More cache-busting'
tags = ['linux','CSS']
+++
**Well, that was easy.**
At the end of [my last post](cache-busting), I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution --- mine usually are --- but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted *only* when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.
Here is the new build script:
```bash
#!/usr/bin/env bash
prev_mtime=$(cat styles.mtime)
curr_mtime=$(stat -c %Y css/styles.css)
##has styles.css been modified?
if [[ $prev_mtime != "$curr_mtime" ]]; then
##update .mtimes
sed -i "1s/.*/$curr_mtime/" styles.mtime
echo "file has been modified!"
##insert the commit id
COMMIT="$(git rev-parse HEAD)"
sed -i "s/css?=\w*/css?v=${COMMIT}/g" index.html
fi
```
## What?
The key here is the command `stat`, which gives access to a load of useful data from the Linux filesystem. In this case, we're getting the time last modified. Try it for yourself and see what comes back.
```bash
echo $(stat -c %Y foo.file)
1731532468
```
So all I have to do is write that unix timecode to a file (with our old friend `sed`), then I can compare this value to whatever gets returned at build time, and only insert the Git id if the CSS has changed. Job done!

View File

@ -1,5 +1,5 @@
+++
date = '2024-11-14T14:24:21+01:00'
date = '2024-11-13T14:24:21+01:00'
draft = false
title = 'Invalidating the browser cache'
tags = ['css','html','linux']
@ -34,7 +34,7 @@ Of course there is.
Look at this:
```html
<link rel="stylesheet" href="css/defaults.css?v=2"/>
<link rel="stylesheet" href="css/defaults.css?2"/>
```
As I'm requesting the file via http, I can append a query. Awesome. Not awesome enough though. I'm too lazy to edit this line of code every time I push a commit, and, being human, I'll probably forget at a critical moment. This can only mean one thing: it's time to bash (🤣) out a quick build script.
@ -43,7 +43,7 @@ As I'm requesting the file via http, I can append a query. Awesome. Not awesome
```bash
#!/usr/bin/env bash
COMMIT="$(git rev-parse HEAD)"
sed -i "s/css?v=\w*/css?${COMMIT}/g" index.html
sed -i "s/css?=\w*/css?${COMMIT}/g" index.html
```
Let's talk about what's happening here:
@ -56,7 +56,7 @@ Now, whenever we push a new commit, any CSS imports in `index.html` will be chan
```html
<link rel="stylesheet"
href="css/styles.css?v=ab184410c10c1adfb8b85b03b316f72b"
href="css/styles.css?=ab184410c10c1adfb8b85b03b316f72b"
/>
```
Now I just need to add the build script to my Jenkinsfile...

View File

@ -1,4 +1,4 @@
baseURL = 'http://devlog.ajstepien.xyz/'
baseURL = 'http://192.168.70/'
languageCode = 'en-us'
title = 'Coding with Andrzej'
theme = "cuqui"

View File

@ -6,7 +6,6 @@
<title>
Categories | Coding with Andrzej
</title>
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
@ -30,7 +29,7 @@
</head>
<body>
<header>
<a href=http://devlog.ajstepien.xyz/><h1>Coding with Andrzej</h1></a>
<a href=http://192.168.70/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>

View File

@ -2,10 +2,10 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Categories on Coding with Andrzej</title>
<link>http://devlog.ajstepien.xyz/categories/</link>
<link>http://192.168.70/categories/</link>
<description>Recent content in Categories on Coding with Andrzej</description>
<generator>Hugo</generator>
<language>en-us</language>
<atom:link href="http://devlog.ajstepien.xyz/categories/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://192.168.70/categories/index.xml" rel="self" type="application/rss+xml" />
</channel>
</rss>

View File

@ -7,7 +7,6 @@
<title>
Coding with Andrzej
</title>
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
@ -31,7 +30,7 @@
</head>
<body>
<header>
<a href=http://devlog.ajstepien.xyz/><h1>Coding with Andrzej</h1></a>
<a href=http://192.168.70/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>
@ -55,10 +54,11 @@
<h1>Latest...</h1>
<h2><a href="/posts/cache-busting-2/">More cache-busting</a></h2>
<p><strong>Well, that was easy.</strong></p>
<p>At the end of <a href="cache-busting">my last post</a>, I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution &mdash; mine usually are &mdash; but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted <em>only</em> when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.</p>
<a href="/posts/cache-busting-2/">Read more...</a>
<h2><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
<p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
<p>I pushed some changes incorporating images for the first time (I know &ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&hellip; the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
<p>The experienced computer touchers amongst you will be saying &ldquo;this is obviously a cache problem&rdquo;, and you&rsquo;re right, it is obviously a cache problem. Pressing <code>CTR + SHIFT + R</code> (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people&rsquo;s machines? <strong>I needed to cache-bust.</strong></p>
<a href="/posts/cache-busting/">Read more...</a>
</main>

View File

@ -2,31 +2,24 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Home on Coding with Andrzej</title>
<link>http://devlog.ajstepien.xyz/</link>
<link>http://192.168.70/</link>
<description>Recent content in Home on Coding with Andrzej</description>
<generator>Hugo</generator>
<language>en-us</language>
<lastBuildDate>Fri, 15 Nov 2024 22:33:10 +0100</lastBuildDate>
<atom:link href="http://devlog.ajstepien.xyz/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>More cache-busting</title>
<link>http://devlog.ajstepien.xyz/posts/cache-busting-2/</link>
<pubDate>Fri, 15 Nov 2024 22:33:10 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/cache-busting-2/</guid>
<description>&lt;p&gt;&lt;strong&gt;Well, that was easy.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;At the end of &lt;a href=&#34;cache-busting&#34;&gt;my last post&lt;/a&gt;, I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution &amp;mdash; mine usually are &amp;mdash; but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted &lt;em&gt;only&lt;/em&gt; when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.&lt;/p&gt;</description>
</item>
<lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
<atom:link href="http://192.168.70/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Invalidating the browser cache</title>
<link>http://devlog.ajstepien.xyz/posts/cache-busting/</link>
<pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/cache-busting/</guid>
<link>http://192.168.70/posts/cache-busting/</link>
<pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://192.168.70/posts/cache-busting/</guid>
<description>&lt;p&gt;&lt;strong&gt;I had a bit of an issue with my &lt;a href=&#34;https://demos.ajstepien.xyz&#34;&gt;website&lt;/a&gt; recently.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I pushed some changes incorporating images for the first time (I know &amp;ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&amp;hellip; the images were not styled. Stranger still, they &lt;em&gt;were&lt;/em&gt; styled when I loaded the same page in Chrome.&lt;/p&gt;&#xA;&lt;p&gt;The experienced computer touchers amongst you will be saying &amp;ldquo;this is obviously a cache problem&amp;rdquo;, and you&amp;rsquo;re right, it is obviously a cache problem. Pressing &lt;code&gt;CTR + SHIFT + R&lt;/code&gt; (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people&amp;rsquo;s machines? &lt;strong&gt;I needed to cache-bust.&lt;/strong&gt;&lt;/p&gt;</description>
</item>
<item>
<title>Permissions strike again</title>
<link>http://devlog.ajstepien.xyz/posts/permissions-strike-again/</link>
<link>http://192.168.70/posts/permissions-strike-again/</link>
<pubDate>Wed, 13 Nov 2024 11:53:13 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/permissions-strike-again/</guid>
<guid>http://192.168.70/posts/permissions-strike-again/</guid>
<description>&lt;p&gt;Configuring Apache really isn&amp;rsquo;t rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it&amp;rsquo;s one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;And it almost always has to do with permissions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;So, I&amp;rsquo;m writing this post both as a means of christening this devlog (&lt;a href=&#34;https://demos.ajstepien.xyz&#34;&gt;Hi! I&amp;rsquo;m Andrzej! Hire me!&lt;/a&gt;) and also as a reminder to myself that &lt;em&gt;the home folder is not executable by default.&lt;/em&gt;&lt;/p&gt;</description>
</item>
</channel>

View File

@ -1,65 +0,0 @@
<!DOCTYPE html>
<html lang="en-us" dir="ltr">
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>
| Coding with Andrzej
</title>
<link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/syntax.css" />
<link rel="stylesheet" href="/css/defaults.css" />
<script src="/js/main.js"></script>
</head>
<body>
<header>
<a href=http://localhost:1313/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>
<li>
<a href="/">Home</a>
</li>
<li>
<a aria-current="true" class="ancestor" href="/posts/">Posts</a>
</li>
<li>
<a href="/tags/">Tags</a>
</li>
</ul>
</nav>
</header>
<main>
<h1></h1>
<time datetime="2024-11-15T22:33:10&#43;01:00">November 15, 2024</time>
</main>
<footer>
<p>Copyright 2024. All rights reserved.</p>
</footer>
</body>
</html>

View File

@ -1,95 +0,0 @@
<!DOCTYPE html>
<html lang="en-us" dir="ltr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>
More cache-busting | Coding with Andrzej
</title>
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
<link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/syntax.css" />
<link rel="stylesheet" href="/css/defaults.css" />
<script src="/js/main.23cd0c7d837263b9eaeb96ee2d9ccfa2969daa3fa00fa1c1fe8701a9b87251a1.js" integrity="sha256-I80MfYNyY7nq65buLZzPopadqj&#43;gD6HB/ocBqbhyUaE=" crossorigin="anonymous"></script>
</head>
<body>
<header>
<a href=http://devlog.ajstepien.xyz/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>
<li>
<a href="/">Home</a>
</li>
<li>
<a aria-current="true" class="ancestor" href="/posts/">Posts</a>
</li>
<li>
<a href="/tags/">Tags</a>
</li>
</ul>
</nav>
</header>
<main>
<h1>More cache-busting</h1>
<time datetime="2024-11-15T22:33:10&#43;01:00">November 15, 2024</time>
<p><strong>Well, that was easy.</strong></p>
<p>At the end of <a href="cache-busting">my last post</a>, I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution &mdash; mine usually are &mdash; but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted <em>only</em> when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.</p>
<p>Here is the new build script:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/usr/bin/env bash
</span></span></span><span class="line"><span class="cl"><span class="cp"></span>
</span></span><span class="line"><span class="cl"><span class="nv">prev_mtime</span><span class="o">=</span><span class="k">$(</span>cat styles.mtime<span class="k">)</span>
</span></span><span class="line"><span class="cl"><span class="nv">curr_mtime</span><span class="o">=</span><span class="k">$(</span>stat -c %Y css/styles.css<span class="k">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">##has styles.css been modified?</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="o">[[</span> <span class="nv">$prev_mtime</span> !<span class="o">=</span> <span class="s2">&#34;</span><span class="nv">$curr_mtime</span><span class="s2">&#34;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl"> <span class="c1">##update .mtimes</span>
</span></span><span class="line"><span class="cl"> sed -i <span class="s2">&#34;1s/.*/</span><span class="nv">$curr_mtime</span><span class="s2">/&#34;</span> styles.mtime
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> <span class="s2">&#34;file has been modified!&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c1">##insert the commit id</span>
</span></span><span class="line"><span class="cl"> <span class="nv">COMMIT</span><span class="o">=</span><span class="s2">&#34;</span><span class="k">$(</span>git rev-parse HEAD<span class="k">)</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"> sed -i <span class="s2">&#34;s/css?=\w*/css?v=</span><span class="si">${</span><span class="nv">COMMIT</span><span class="si">}</span><span class="s2">/g&#34;</span> index.html
</span></span><span class="line"><span class="cl"><span class="k">fi</span>
</span></span></code></pre></div><h2 id="what">What?</h2>
<p>The key here is the command <code>stat</code>, which gives access to a load of useful data from the Linux filesystem. In this case, we&rsquo;re getting the time last modified. Try it for yourself and see what comes back.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="k">$(</span>stat -c %Y foo.file<span class="k">)</span>
</span></span><span class="line"><span class="cl"><span class="m">1731532468</span>
</span></span></code></pre></div><p>So all I have to do is write that unix timecode to a file (with our old friend <code>sed</code>), then I can compare this value to whatever gets returned at build time, and only insert the Git id if the CSS has changed. Job done!</p>
<div>
<div>Tags:</div>
<ul class="post-tags">
<li><a href="/tags/linux/">Linux</a></li>
<li><a href="/tags/css/">CSS</a></li>
</ul>
</div>
</main>
<footer>
<p>Copyright 2024. All rights reserved.</p>
</footer>
</body>
</html>

View File

@ -6,7 +6,6 @@
<title>
Invalidating the browser cache | Coding with Andrzej
</title>
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
@ -30,7 +29,7 @@
</head>
<body>
<header>
<a href=http://devlog.ajstepien.xyz/><h1>Coding with Andrzej</h1></a>
<a href=http://192.168.70/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>
@ -53,7 +52,7 @@
<h1>Invalidating the browser cache</h1>
<time datetime="2024-11-14T14:24:21&#43;01:00">November 14, 2024</time>
<time datetime="2024-11-13T14:24:21&#43;01:00">November 13, 2024</time>
<p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
<p>I pushed some changes incorporating images for the first time (I know &ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&hellip; the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
@ -68,18 +67,18 @@
<p>Of course there is.</p>
<h3 id="using-a-query">Using a query</h3>
<p>Look at this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">&#34;stylesheet&#34;</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;css/defaults.css?v=2&#34;</span><span class="p">/&gt;</span>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">&#34;stylesheet&#34;</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;css/defaults.css?2&#34;</span><span class="p">/&gt;</span>
</span></span></code></pre></div><p>As I&rsquo;m requesting the file via http, I can append a query. Awesome. Not awesome enough though. I&rsquo;m too lazy to edit this line of code every time I push a commit, and, being human, I&rsquo;ll probably forget at a critical moment. This can only mean one thing: it&rsquo;s time to bash (🤣) out a quick build script.</p>
<h3 id="automating-query-insertion">Automating query insertion</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/usr/bin/env bash
</span></span></span><span class="line"><span class="cl"><span class="cp"></span><span class="nv">COMMIT</span><span class="o">=</span><span class="s2">&#34;</span><span class="k">$(</span>git rev-parse HEAD<span class="k">)</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">sed -i <span class="s2">&#34;s/css?v=\w*/css?</span><span class="si">${</span><span class="nv">COMMIT</span><span class="si">}</span><span class="s2">/g&#34;</span> index.html
</span></span><span class="line"><span class="cl">sed -i <span class="s2">&#34;s/css?=\w*/css?</span><span class="si">${</span><span class="nv">COMMIT</span><span class="si">}</span><span class="s2">/g&#34;</span> index.html
</span></span></code></pre></div><p>Let&rsquo;s talk about what&rsquo;s happening here:</p>
<p><code>COMMIT=&quot;$(git rev-parse HEAD)&quot;</code> gets the commit id from Git and assigns it to the variable <code>$COMMIT</code>.</p>
<p>Then, <code>sed -i &quot;s/css?=\w*/css?${COMMIT}/g&quot; index.html</code> does a find and replace in the file <code>index.html</code>. The regular expression <code>css?=\w*</code> matches &lsquo;css?=&rsquo; plus any number of contiguous alphanumeric characters (everything until the next quote mark) before replacing these alphanumeric characters with the commit id. The flag <code>-i</code> tells <code>sed</code> to edit the file in place. The <code>g</code> tells it to perform the operation on the whole file.</p>
<p>Now, whenever we push a new commit, any CSS imports in <code>index.html</code> will be changed to something like this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">&#34;stylesheet&#34;</span>
</span></span><span class="line"><span class="cl"><span class="na">href</span><span class="o">=</span><span class="s">&#34;css/styles.css?v=ab184410c10c1adfb8b85b03b316f72b&#34;</span>
</span></span><span class="line"><span class="cl"><span class="na">href</span><span class="o">=</span><span class="s">&#34;css/styles.css?=ab184410c10c1adfb8b85b03b316f72b&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">/&gt;</span>
</span></span></code></pre></div><p>Now I just need to add the build script to my Jenkinsfile&hellip;</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-groovy" data-lang="groovy"><span class="line"><span class="cl"> <span class="n">stage</span><span class="o">(</span><span class="s1">&#39;build&#39;</span><span class="o">){</span>
@ -94,7 +93,7 @@
<div>
<div>Tags:</div>
<ul class="post-tags">
<li><a href="/tags/css/">CSS</a></li>
<li><a href="/tags/css/">Css</a></li>
<li><a href="/tags/html/">Html</a></li>
<li><a href="/tags/linux/">Linux</a></li>
</ul>

View File

@ -6,7 +6,6 @@
<title>
Posts | Coding with Andrzej
</title>
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
@ -30,7 +29,7 @@
</head>
<body>
<header>
<a href=http://devlog.ajstepien.xyz/><h1>Coding with Andrzej</h1></a>
<a href=http://192.168.70/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>
@ -58,25 +57,8 @@
<ul class="page-list">
<li>
<h2 class="center"><a href="/posts/cache-busting-2/">More cache-busting</a></h2>
<time datetime="2024-11-15T22:33:10&#43;01:00">November 15, 2024</time>
<p><strong>Well, that was easy.</strong></p>
<p>At the end of <a href="cache-busting">my last post</a>, I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution &mdash; mine usually are &mdash; but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted <em>only</em> when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.</p>
<a href="/posts/cache-busting-2/">Read more...</a>
</li>
<li>
<h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
<time datetime="2024-11-14T14:24:21&#43;01:00">November 14, 2024</time>
<p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
<p>I pushed some changes incorporating images for the first time (I know &ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&hellip; the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
<p>The experienced computer touchers amongst you will be saying &ldquo;this is obviously a cache problem&rdquo;, and you&rsquo;re right, it is obviously a cache problem. Pressing <code>CTR + SHIFT + R</code> (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people&rsquo;s machines? <strong>I needed to cache-bust.</strong></p>
@ -87,10 +69,6 @@
<li>
<h2 class="center"><a href="/posts/permissions-strike-again/">Permissions strike again</a></h2>
<time datetime="2024-11-13T11:53:13&#43;01:00">November 13, 2024</time>
<p>Configuring Apache really isn&rsquo;t rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it&rsquo;s one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.</p>
<p><em><strong>And it almost always has to do with permissions.</strong></em></p>
<p>So, I&rsquo;m writing this post both as a means of christening this devlog (<a href="https://demos.ajstepien.xyz">Hi! I&rsquo;m Andrzej! Hire me!</a>) and also as a reminder to myself that <em>the home folder is not executable by default.</em></p>

View File

@ -2,31 +2,24 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Posts on Coding with Andrzej</title>
<link>http://devlog.ajstepien.xyz/posts/</link>
<link>http://192.168.70/posts/</link>
<description>Recent content in Posts on Coding with Andrzej</description>
<generator>Hugo</generator>
<language>en-us</language>
<lastBuildDate>Fri, 15 Nov 2024 22:33:10 +0100</lastBuildDate>
<atom:link href="http://devlog.ajstepien.xyz/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>More cache-busting</title>
<link>http://devlog.ajstepien.xyz/posts/cache-busting-2/</link>
<pubDate>Fri, 15 Nov 2024 22:33:10 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/cache-busting-2/</guid>
<description>&lt;p&gt;&lt;strong&gt;Well, that was easy.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;At the end of &lt;a href=&#34;cache-busting&#34;&gt;my last post&lt;/a&gt;, I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution &amp;mdash; mine usually are &amp;mdash; but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted &lt;em&gt;only&lt;/em&gt; when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.&lt;/p&gt;</description>
</item>
<lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
<atom:link href="http://192.168.70/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Invalidating the browser cache</title>
<link>http://devlog.ajstepien.xyz/posts/cache-busting/</link>
<pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/cache-busting/</guid>
<link>http://192.168.70/posts/cache-busting/</link>
<pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://192.168.70/posts/cache-busting/</guid>
<description>&lt;p&gt;&lt;strong&gt;I had a bit of an issue with my &lt;a href=&#34;https://demos.ajstepien.xyz&#34;&gt;website&lt;/a&gt; recently.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I pushed some changes incorporating images for the first time (I know &amp;ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&amp;hellip; the images were not styled. Stranger still, they &lt;em&gt;were&lt;/em&gt; styled when I loaded the same page in Chrome.&lt;/p&gt;&#xA;&lt;p&gt;The experienced computer touchers amongst you will be saying &amp;ldquo;this is obviously a cache problem&amp;rdquo;, and you&amp;rsquo;re right, it is obviously a cache problem. Pressing &lt;code&gt;CTR + SHIFT + R&lt;/code&gt; (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people&amp;rsquo;s machines? &lt;strong&gt;I needed to cache-bust.&lt;/strong&gt;&lt;/p&gt;</description>
</item>
<item>
<title>Permissions strike again</title>
<link>http://devlog.ajstepien.xyz/posts/permissions-strike-again/</link>
<link>http://192.168.70/posts/permissions-strike-again/</link>
<pubDate>Wed, 13 Nov 2024 11:53:13 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/permissions-strike-again/</guid>
<guid>http://192.168.70/posts/permissions-strike-again/</guid>
<description>&lt;p&gt;Configuring Apache really isn&amp;rsquo;t rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it&amp;rsquo;s one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;And it almost always has to do with permissions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;So, I&amp;rsquo;m writing this post both as a means of christening this devlog (&lt;a href=&#34;https://demos.ajstepien.xyz&#34;&gt;Hi! I&amp;rsquo;m Andrzej! Hire me!&lt;/a&gt;) and also as a reminder to myself that &lt;em&gt;the home folder is not executable by default.&lt;/em&gt;&lt;/p&gt;</description>
</item>
</channel>

View File

@ -6,7 +6,6 @@
<title>
Permissions strike again | Coding with Andrzej
</title>
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
@ -30,7 +29,7 @@
</head>
<body>
<header>
<a href=http://devlog.ajstepien.xyz/><h1>Coding with Andrzej</h1></a>
<a href=http://192.168.70/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>

View File

@ -2,33 +2,30 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>http://devlog.ajstepien.xyz/tags/css/</loc>
<lastmod>2024-11-15T22:33:10+01:00</lastmod>
<loc>http://192.168.70/tags/css/</loc>
<lastmod>2024-11-13T14:24:21+01:00</lastmod>
</url><url>
<loc>http://devlog.ajstepien.xyz/tags/linux/</loc>
<lastmod>2024-11-15T22:33:10+01:00</lastmod>
<loc>http://192.168.70/tags/html/</loc>
<lastmod>2024-11-13T14:24:21+01:00</lastmod>
</url><url>
<loc>http://devlog.ajstepien.xyz/posts/cache-busting-2/</loc>
<lastmod>2024-11-15T22:33:10+01:00</lastmod>
<loc>http://192.168.70/posts/cache-busting/</loc>
<lastmod>2024-11-13T14:24:21+01:00</lastmod>
</url><url>
<loc>http://devlog.ajstepien.xyz/tags/</loc>
<lastmod>2024-11-15T22:33:10+01:00</lastmod>
<loc>http://192.168.70/tags/linux/</loc>
<lastmod>2024-11-13T14:24:21+01:00</lastmod>
</url><url>
<loc>http://devlog.ajstepien.xyz/tags/html/</loc>
<lastmod>2024-11-14T14:24:21+01:00</lastmod>
<loc>http://192.168.70/tags/</loc>
<lastmod>2024-11-13T14:24:21+01:00</lastmod>
</url><url>
<loc>http://devlog.ajstepien.xyz/posts/cache-busting/</loc>
<lastmod>2024-11-14T14:24:21+01:00</lastmod>
</url><url>
<loc>http://devlog.ajstepien.xyz/posts/permissions-strike-again/</loc>
<loc>http://192.168.70/posts/permissions-strike-again/</loc>
<lastmod>2024-11-13T11:53:13+01:00</lastmod>
</url><url>
<loc>http://devlog.ajstepien.xyz/posts/</loc>
<loc>http://192.168.70/posts/</loc>
<lastmod>2023-01-01T08:30:00-07:00</lastmod>
</url><url>
<loc>http://devlog.ajstepien.xyz/</loc>
<loc>http://192.168.70/</loc>
<lastmod>2023-01-01T08:00:00-07:00</lastmod>
</url><url>
<loc>http://devlog.ajstepien.xyz/categories/</loc>
<loc>http://192.168.70/categories/</loc>
</url>
</urlset>

View File

@ -4,9 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>
CSS | Coding with Andrzej
Css | Coding with Andrzej
</title>
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
@ -30,7 +29,7 @@
</head>
<body>
<header>
<a href=http://devlog.ajstepien.xyz/><h1>Coding with Andrzej</h1></a>
<a href=http://192.168.70/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>
@ -50,7 +49,7 @@
</header>
<main>
<h1>CSS</h1>
<h1>Css</h1>
@ -58,25 +57,8 @@
<ul class="page-list">
<li>
<h2 class="center"><a href="/posts/cache-busting-2/">More cache-busting</a></h2>
<time datetime="2024-11-15T22:33:10&#43;01:00">November 15, 2024</time>
<p><strong>Well, that was easy.</strong></p>
<p>At the end of <a href="cache-busting">my last post</a>, I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution &mdash; mine usually are &mdash; but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted <em>only</em> when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.</p>
<a href="/posts/cache-busting-2/">Read more...</a>
</li>
<li>
<h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
<time datetime="2024-11-14T14:24:21&#43;01:00">November 14, 2024</time>
<p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
<p>I pushed some changes incorporating images for the first time (I know &ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&hellip; the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
<p>The experienced computer touchers amongst you will be saying &ldquo;this is obviously a cache problem&rdquo;, and you&rsquo;re right, it is obviously a cache problem. Pressing <code>CTR + SHIFT + R</code> (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people&rsquo;s machines? <strong>I needed to cache-bust.</strong></p>

View File

@ -1,25 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>CSS on Coding with Andrzej</title>
<link>http://devlog.ajstepien.xyz/tags/css/</link>
<description>Recent content in CSS on Coding with Andrzej</description>
<title>Css on Coding with Andrzej</title>
<link>http://192.168.70/tags/css/</link>
<description>Recent content in Css on Coding with Andrzej</description>
<generator>Hugo</generator>
<language>en-us</language>
<lastBuildDate>Fri, 15 Nov 2024 22:33:10 +0100</lastBuildDate>
<atom:link href="http://devlog.ajstepien.xyz/tags/css/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>More cache-busting</title>
<link>http://devlog.ajstepien.xyz/posts/cache-busting-2/</link>
<pubDate>Fri, 15 Nov 2024 22:33:10 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/cache-busting-2/</guid>
<description>&lt;p&gt;&lt;strong&gt;Well, that was easy.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;At the end of &lt;a href=&#34;cache-busting&#34;&gt;my last post&lt;/a&gt;, I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution &amp;mdash; mine usually are &amp;mdash; but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted &lt;em&gt;only&lt;/em&gt; when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.&lt;/p&gt;</description>
</item>
<lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
<atom:link href="http://192.168.70/tags/css/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Invalidating the browser cache</title>
<link>http://devlog.ajstepien.xyz/posts/cache-busting/</link>
<pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/cache-busting/</guid>
<link>http://192.168.70/posts/cache-busting/</link>
<pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://192.168.70/posts/cache-busting/</guid>
<description>&lt;p&gt;&lt;strong&gt;I had a bit of an issue with my &lt;a href=&#34;https://demos.ajstepien.xyz&#34;&gt;website&lt;/a&gt; recently.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I pushed some changes incorporating images for the first time (I know &amp;ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&amp;hellip; the images were not styled. Stranger still, they &lt;em&gt;were&lt;/em&gt; styled when I loaded the same page in Chrome.&lt;/p&gt;&#xA;&lt;p&gt;The experienced computer touchers amongst you will be saying &amp;ldquo;this is obviously a cache problem&amp;rdquo;, and you&amp;rsquo;re right, it is obviously a cache problem. Pressing &lt;code&gt;CTR + SHIFT + R&lt;/code&gt; (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people&amp;rsquo;s machines? &lt;strong&gt;I needed to cache-bust.&lt;/strong&gt;&lt;/p&gt;</description>
</item>
</channel>

View File

@ -6,7 +6,6 @@
<title>
Html | Coding with Andrzej
</title>
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
@ -30,7 +29,7 @@
</head>
<body>
<header>
<a href=http://devlog.ajstepien.xyz/><h1>Coding with Andrzej</h1></a>
<a href=http://192.168.70/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>
@ -60,10 +59,6 @@
<li>
<h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
<time datetime="2024-11-14T14:24:21&#43;01:00">November 14, 2024</time>
<p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
<p>I pushed some changes incorporating images for the first time (I know &ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&hellip; the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
<p>The experienced computer touchers amongst you will be saying &ldquo;this is obviously a cache problem&rdquo;, and you&rsquo;re right, it is obviously a cache problem. Pressing <code>CTR + SHIFT + R</code> (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people&rsquo;s machines? <strong>I needed to cache-bust.</strong></p>

View File

@ -2,17 +2,17 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Html on Coding with Andrzej</title>
<link>http://devlog.ajstepien.xyz/tags/html/</link>
<link>http://192.168.70/tags/html/</link>
<description>Recent content in Html on Coding with Andrzej</description>
<generator>Hugo</generator>
<language>en-us</language>
<lastBuildDate>Thu, 14 Nov 2024 14:24:21 +0100</lastBuildDate>
<atom:link href="http://devlog.ajstepien.xyz/tags/html/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
<atom:link href="http://192.168.70/tags/html/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Invalidating the browser cache</title>
<link>http://devlog.ajstepien.xyz/posts/cache-busting/</link>
<pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/cache-busting/</guid>
<link>http://192.168.70/posts/cache-busting/</link>
<pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://192.168.70/posts/cache-busting/</guid>
<description>&lt;p&gt;&lt;strong&gt;I had a bit of an issue with my &lt;a href=&#34;https://demos.ajstepien.xyz&#34;&gt;website&lt;/a&gt; recently.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I pushed some changes incorporating images for the first time (I know &amp;ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&amp;hellip; the images were not styled. Stranger still, they &lt;em&gt;were&lt;/em&gt; styled when I loaded the same page in Chrome.&lt;/p&gt;&#xA;&lt;p&gt;The experienced computer touchers amongst you will be saying &amp;ldquo;this is obviously a cache problem&amp;rdquo;, and you&amp;rsquo;re right, it is obviously a cache problem. Pressing &lt;code&gt;CTR + SHIFT + R&lt;/code&gt; (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people&amp;rsquo;s machines? &lt;strong&gt;I needed to cache-bust.&lt;/strong&gt;&lt;/p&gt;</description>
</item>
</channel>

View File

@ -6,7 +6,6 @@
<title>
Tags | Coding with Andrzej
</title>
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
@ -30,7 +29,7 @@
</head>
<body>
<header>
<a href=http://devlog.ajstepien.xyz/><h1>Coding with Andrzej</h1></a>
<a href=http://192.168.70/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>
@ -60,18 +59,7 @@
<li>
<h2 class="center"><a href="/tags/css/">CSS</a></h2>
</li>
<li>
<h2 class="center"><a href="/tags/linux/">Linux</a></h2>
<h2 class="center"><a href="/tags/css/">Css</a></h2>
@ -82,6 +70,11 @@
</li>
<li>
<h2 class="center"><a href="/tags/linux/">Linux</a></h2>
</li>

View File

@ -2,31 +2,31 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Tags on Coding with Andrzej</title>
<link>http://devlog.ajstepien.xyz/tags/</link>
<link>http://192.168.70/tags/</link>
<description>Recent content in Tags on Coding with Andrzej</description>
<generator>Hugo</generator>
<language>en-us</language>
<lastBuildDate>Fri, 15 Nov 2024 22:33:10 +0100</lastBuildDate>
<atom:link href="http://devlog.ajstepien.xyz/tags/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
<atom:link href="http://192.168.70/tags/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>CSS</title>
<link>http://devlog.ajstepien.xyz/tags/css/</link>
<pubDate>Fri, 15 Nov 2024 22:33:10 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/tags/css/</guid>
<description></description>
</item>
<item>
<title>Linux</title>
<link>http://devlog.ajstepien.xyz/tags/linux/</link>
<pubDate>Fri, 15 Nov 2024 22:33:10 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/tags/linux/</guid>
<title>Css</title>
<link>http://192.168.70/tags/css/</link>
<pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://192.168.70/tags/css/</guid>
<description></description>
</item>
<item>
<title>Html</title>
<link>http://devlog.ajstepien.xyz/tags/html/</link>
<pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/tags/html/</guid>
<link>http://192.168.70/tags/html/</link>
<pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://192.168.70/tags/html/</guid>
<description></description>
</item>
<item>
<title>Linux</title>
<link>http://192.168.70/tags/linux/</link>
<pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://192.168.70/tags/linux/</guid>
<description></description>
</item>
</channel>

View File

@ -6,7 +6,6 @@
<title>
Linux | Coding with Andrzej
</title>
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
@ -30,7 +29,7 @@
</head>
<body>
<header>
<a href=http://devlog.ajstepien.xyz/><h1>Coding with Andrzej</h1></a>
<a href=http://192.168.70/><h1>Coding with Andrzej</h1></a>
<nav>
<ul>
@ -58,25 +57,8 @@
<ul class="page-list">
<li>
<h2 class="center"><a href="/posts/cache-busting-2/">More cache-busting</a></h2>
<time datetime="2024-11-15T22:33:10&#43;01:00">November 15, 2024</time>
<p><strong>Well, that was easy.</strong></p>
<p>At the end of <a href="cache-busting">my last post</a>, I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution &mdash; mine usually are &mdash; but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted <em>only</em> when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.</p>
<a href="/posts/cache-busting-2/">Read more...</a>
</li>
<li>
<h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
<time datetime="2024-11-14T14:24:21&#43;01:00">November 14, 2024</time>
<p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
<p>I pushed some changes incorporating images for the first time (I know &ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&hellip; the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
<p>The experienced computer touchers amongst you will be saying &ldquo;this is obviously a cache problem&rdquo;, and you&rsquo;re right, it is obviously a cache problem. Pressing <code>CTR + SHIFT + R</code> (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people&rsquo;s machines? <strong>I needed to cache-bust.</strong></p>
@ -87,10 +69,6 @@
<li>
<h2 class="center"><a href="/posts/permissions-strike-again/">Permissions strike again</a></h2>
<time datetime="2024-11-13T11:53:13&#43;01:00">November 13, 2024</time>
<p>Configuring Apache really isn&rsquo;t rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it&rsquo;s one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.</p>
<p><em><strong>And it almost always has to do with permissions.</strong></em></p>
<p>So, I&rsquo;m writing this post both as a means of christening this devlog (<a href="https://demos.ajstepien.xyz">Hi! I&rsquo;m Andrzej! Hire me!</a>) and also as a reminder to myself that <em>the home folder is not executable by default.</em></p>

View File

@ -2,31 +2,24 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Linux on Coding with Andrzej</title>
<link>http://devlog.ajstepien.xyz/tags/linux/</link>
<link>http://192.168.70/tags/linux/</link>
<description>Recent content in Linux on Coding with Andrzej</description>
<generator>Hugo</generator>
<language>en-us</language>
<lastBuildDate>Fri, 15 Nov 2024 22:33:10 +0100</lastBuildDate>
<atom:link href="http://devlog.ajstepien.xyz/tags/linux/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>More cache-busting</title>
<link>http://devlog.ajstepien.xyz/posts/cache-busting-2/</link>
<pubDate>Fri, 15 Nov 2024 22:33:10 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/cache-busting-2/</guid>
<description>&lt;p&gt;&lt;strong&gt;Well, that was easy.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;At the end of &lt;a href=&#34;cache-busting&#34;&gt;my last post&lt;/a&gt;, I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution &amp;mdash; mine usually are &amp;mdash; but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted &lt;em&gt;only&lt;/em&gt; when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.&lt;/p&gt;</description>
</item>
<lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
<atom:link href="http://192.168.70/tags/linux/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Invalidating the browser cache</title>
<link>http://devlog.ajstepien.xyz/posts/cache-busting/</link>
<pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/cache-busting/</guid>
<link>http://192.168.70/posts/cache-busting/</link>
<pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
<guid>http://192.168.70/posts/cache-busting/</guid>
<description>&lt;p&gt;&lt;strong&gt;I had a bit of an issue with my &lt;a href=&#34;https://demos.ajstepien.xyz&#34;&gt;website&lt;/a&gt; recently.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I pushed some changes incorporating images for the first time (I know &amp;ndash; very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox&amp;hellip; the images were not styled. Stranger still, they &lt;em&gt;were&lt;/em&gt; styled when I loaded the same page in Chrome.&lt;/p&gt;&#xA;&lt;p&gt;The experienced computer touchers amongst you will be saying &amp;ldquo;this is obviously a cache problem&amp;rdquo;, and you&amp;rsquo;re right, it is obviously a cache problem. Pressing &lt;code&gt;CTR + SHIFT + R&lt;/code&gt; (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people&amp;rsquo;s machines? &lt;strong&gt;I needed to cache-bust.&lt;/strong&gt;&lt;/p&gt;</description>
</item>
<item>
<title>Permissions strike again</title>
<link>http://devlog.ajstepien.xyz/posts/permissions-strike-again/</link>
<link>http://192.168.70/posts/permissions-strike-again/</link>
<pubDate>Wed, 13 Nov 2024 11:53:13 +0100</pubDate>
<guid>http://devlog.ajstepien.xyz/posts/permissions-strike-again/</guid>
<guid>http://192.168.70/posts/permissions-strike-again/</guid>
<description>&lt;p&gt;Configuring Apache really isn&amp;rsquo;t rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it&amp;rsquo;s one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;And it almost always has to do with permissions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;So, I&amp;rsquo;m writing this post both as a means of christening this devlog (&lt;a href=&#34;https://demos.ajstepien.xyz&#34;&gt;Hi! I&amp;rsquo;m Andrzej! Hire me!&lt;/a&gt;) and also as a reminder to myself that &lt;em&gt;the home folder is not executable by default.&lt;/em&gt;&lt;/p&gt;</description>
</item>
</channel>

View File

@ -12,12 +12,6 @@
{{ range .Pages }}
<li>
<h2 class="center"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{if $isTags}}
{{else}}
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} {{
$dateHuman := .Date | time.Format ":date_long" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{end}}
{{ .Summary }}
{{if $isTags}}
{{else}}

View File

@ -4,5 +4,4 @@
{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title
site.Title }}{{ end }}
</title>
<link rel="alternate" type="application/rss+xml" href="{{.Site.BaseURL}}/index.xml" title="Coding with Andrzej">
{{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }}