Compare commits
	
		
			No commits in common. "eac5573121d3caafb9fab21eef471364edcbdfd9" and "afbba7e3440a680e6de11a7cd12134b0e753ca3c" have entirely different histories.
		
	
	
		
			eac5573121
			...
			afbba7e344
		
	
		| 
						 | 
					@ -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!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
+++
 | 
					+++
 | 
				
			||||||
date = '2024-11-14T14:24:21+01:00'
 | 
					date = '2024-11-13T14:24:21+01:00'
 | 
				
			||||||
draft = false
 | 
					draft = false
 | 
				
			||||||
title = 'Invalidating the browser cache'
 | 
					title = 'Invalidating the browser cache'
 | 
				
			||||||
tags = ['css','html','linux']
 | 
					tags = ['css','html','linux']
 | 
				
			||||||
| 
						 | 
					@ -34,7 +34,7 @@ Of course there is.
 | 
				
			||||||
Look at this:
 | 
					Look at this:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```html
 | 
					```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.
 | 
					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
 | 
					```bash
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
COMMIT="$(git rev-parse HEAD)"
 | 
					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:
 | 
					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
 | 
					```html
 | 
				
			||||||
<link rel="stylesheet" 
 | 
					<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...
 | 
					Now I just need to add the build script to my Jenkinsfile...
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
baseURL = 'http://devlog.ajstepien.xyz/'
 | 
					baseURL = 'http://192.168.70/'
 | 
				
			||||||
languageCode = 'en-us'
 | 
					languageCode = 'en-us'
 | 
				
			||||||
title = 'Coding with Andrzej'
 | 
					title = 'Coding with Andrzej'
 | 
				
			||||||
theme = "cuqui"
 | 
					theme = "cuqui"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@
 | 
				
			||||||
<title>
 | 
					<title>
 | 
				
			||||||
  Categories | Coding with Andrzej
 | 
					  Categories | Coding with Andrzej
 | 
				
			||||||
</title>
 | 
					</title>
 | 
				
			||||||
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +29,7 @@
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
  <header>
 | 
					  <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>
 | 
					  <nav>
 | 
				
			||||||
    <ul>
 | 
					    <ul>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,10 +2,10 @@
 | 
				
			||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
					<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
				
			||||||
  <channel>
 | 
					  <channel>
 | 
				
			||||||
    <title>Categories on Coding with Andrzej</title>
 | 
					    <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>
 | 
					    <description>Recent content in Categories on Coding with Andrzej</description>
 | 
				
			||||||
    <generator>Hugo</generator>
 | 
					    <generator>Hugo</generator>
 | 
				
			||||||
    <language>en-us</language>
 | 
					    <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>
 | 
					  </channel>
 | 
				
			||||||
</rss>
 | 
					</rss>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,6 @@
 | 
				
			||||||
<title>
 | 
					<title>
 | 
				
			||||||
  Coding with Andrzej
 | 
					  Coding with Andrzej
 | 
				
			||||||
</title>
 | 
					</title>
 | 
				
			||||||
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,7 +30,7 @@
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
  <header>
 | 
					  <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>
 | 
					  <nav>
 | 
				
			||||||
    <ul>
 | 
					    <ul>
 | 
				
			||||||
| 
						 | 
					@ -55,10 +54,11 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <h1>Latest...</h1>
 | 
					  <h1>Latest...</h1>
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
    <h2><a href="/posts/cache-busting-2/">More cache-busting</a></h2>
 | 
					    <h2><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
 | 
				
			||||||
    <p><strong>Well, that was easy.</strong></p>
 | 
					    <p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</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 — mine usually are — 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>I pushed some changes incorporating images for the first time (I know – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
 | 
				
			||||||
    <a href="/posts/cache-busting-2/">Read more...</a>
 | 
					<p>The experienced computer touchers amongst you will be saying “this is obviously a cache problem”, and you’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’s machines? <strong>I needed to cache-bust.</strong></p>
 | 
				
			||||||
 | 
					    <a href="/posts/cache-busting/">Read more...</a>
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  </main>
 | 
					  </main>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,31 +2,24 @@
 | 
				
			||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
					<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
				
			||||||
  <channel>
 | 
					  <channel>
 | 
				
			||||||
    <title>Home on Coding with Andrzej</title>
 | 
					    <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>
 | 
					    <description>Recent content in Home on Coding with Andrzej</description>
 | 
				
			||||||
    <generator>Hugo</generator>
 | 
					    <generator>Hugo</generator>
 | 
				
			||||||
    <language>en-us</language>
 | 
					    <language>en-us</language>
 | 
				
			||||||
    <lastBuildDate>Fri, 15 Nov 2024 22:33:10 +0100</lastBuildDate>
 | 
					    <lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
 | 
				
			||||||
    <atom:link href="http://devlog.ajstepien.xyz/index.xml" rel="self" type="application/rss+xml" />
 | 
					    <atom:link href="http://192.168.70/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><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></description>
 | 
					 | 
				
			||||||
    </item>
 | 
					 | 
				
			||||||
    <item>
 | 
					    <item>
 | 
				
			||||||
      <title>Invalidating the browser cache</title>
 | 
					      <title>Invalidating the browser cache</title>
 | 
				
			||||||
      <link>http://devlog.ajstepien.xyz/posts/cache-busting/</link>
 | 
					      <link>http://192.168.70/posts/cache-busting/</link>
 | 
				
			||||||
      <pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
 | 
					      <pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
 | 
				
			||||||
      <guid>http://devlog.ajstepien.xyz/posts/cache-busting/</guid>
 | 
					      <guid>http://192.168.70/posts/cache-busting/</guid>
 | 
				
			||||||
      <description><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></description>
 | 
					      <description><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></description>
 | 
				
			||||||
    </item>
 | 
					    </item>
 | 
				
			||||||
    <item>
 | 
					    <item>
 | 
				
			||||||
      <title>Permissions strike again</title>
 | 
					      <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>
 | 
					      <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><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></description>
 | 
					      <description><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></description>
 | 
				
			||||||
    </item>
 | 
					    </item>
 | 
				
			||||||
  </channel>
 | 
					  </channel>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,65 +0,0 @@
 | 
				
			||||||
<!DOCTYPE html>
 | 
					 | 
				
			||||||
<html lang="en-us" dir="ltr">
 | 
					 | 
				
			||||||
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&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+01:00">November 15, 2024</time>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
  </main>
 | 
					 | 
				
			||||||
  <footer>
 | 
					 | 
				
			||||||
    <p>Copyright 2024. All rights reserved.</p>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  </footer>
 | 
					 | 
				
			||||||
</body>
 | 
					 | 
				
			||||||
</html>
 | 
					 | 
				
			||||||
| 
						 | 
					@ -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+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+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 — mine usually are — 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">"</span><span class="nv">$curr_mtime</span><span class="s2">"</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">"1s/.*/</span><span class="nv">$curr_mtime</span><span class="s2">/"</span> styles.mtime
 | 
					 | 
				
			||||||
</span></span><span class="line"><span class="cl">	<span class="nb">echo</span> <span class="s2">"file has been modified!"</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">"</span><span class="k">$(</span>git rev-parse HEAD<span class="k">)</span><span class="s2">"</span>
 | 
					 | 
				
			||||||
</span></span><span class="line"><span class="cl">	sed -i <span class="s2">"s/css?=\w*/css?v=</span><span class="si">${</span><span class="nv">COMMIT</span><span class="si">}</span><span class="s2">/g"</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’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>
 | 
					 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@
 | 
				
			||||||
<title>
 | 
					<title>
 | 
				
			||||||
  Invalidating the browser cache | Coding with Andrzej
 | 
					  Invalidating the browser cache | Coding with Andrzej
 | 
				
			||||||
</title>
 | 
					</title>
 | 
				
			||||||
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +29,7 @@
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
  <header>
 | 
					  <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>
 | 
					  <nav>
 | 
				
			||||||
    <ul>
 | 
					    <ul>
 | 
				
			||||||
| 
						 | 
					@ -53,7 +52,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<h1>Invalidating the browser cache</h1>
 | 
					<h1>Invalidating the browser cache</h1>
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
<time datetime="2024-11-14T14:24:21+01:00">November 14, 2024</time>
 | 
					<time datetime="2024-11-13T14:24:21+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><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 – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
 | 
					<p>I pushed some changes incorporating images for the first time (I know – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… 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>
 | 
					<p>Of course there is.</p>
 | 
				
			||||||
<h3 id="using-a-query">Using a query</h3>
 | 
					<h3 id="using-a-query">Using a query</h3>
 | 
				
			||||||
<p>Look at this:</p>
 | 
					<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"><</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">"stylesheet"</span> <span class="na">href</span><span class="o">=</span><span class="s">"css/defaults.css?v=2"</span><span class="p">/></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"><</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">"stylesheet"</span> <span class="na">href</span><span class="o">=</span><span class="s">"css/defaults.css?2"</span><span class="p">/></span>
 | 
				
			||||||
</span></span></code></pre></div><p>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.</p>
 | 
					</span></span></code></pre></div><p>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.</p>
 | 
				
			||||||
<h3 id="automating-query-insertion">Automating query insertion</h3>
 | 
					<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
 | 
					<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">"</span><span class="k">$(</span>git rev-parse HEAD<span class="k">)</span><span class="s2">"</span>
 | 
					</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">"</span><span class="k">$(</span>git rev-parse HEAD<span class="k">)</span><span class="s2">"</span>
 | 
				
			||||||
</span></span><span class="line"><span class="cl">sed -i <span class="s2">"s/css?v=\w*/css?</span><span class="si">${</span><span class="nv">COMMIT</span><span class="si">}</span><span class="s2">/g"</span> index.html
 | 
					</span></span><span class="line"><span class="cl">sed -i <span class="s2">"s/css?=\w*/css?</span><span class="si">${</span><span class="nv">COMMIT</span><span class="si">}</span><span class="s2">/g"</span> index.html
 | 
				
			||||||
</span></span></code></pre></div><p>Let’s talk about what’s happening here:</p>
 | 
					</span></span></code></pre></div><p>Let’s talk about what’s happening here:</p>
 | 
				
			||||||
<p><code>COMMIT="$(git rev-parse HEAD)"</code> gets the commit id from Git and assigns it to the variable <code>$COMMIT</code>.</p>
 | 
					<p><code>COMMIT="$(git rev-parse HEAD)"</code> gets the commit id from Git and assigns it to the variable <code>$COMMIT</code>.</p>
 | 
				
			||||||
<p>Then, <code>sed -i "s/css?=\w*/css?${COMMIT}/g" index.html</code> does a find and replace in the file <code>index.html</code>. The regular expression <code>css?=\w*</code> matches ‘css?=’ 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>Then, <code>sed -i "s/css?=\w*/css?${COMMIT}/g" index.html</code> does a find and replace in the file <code>index.html</code>. The regular expression <code>css?=\w*</code> matches ‘css?=’ 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>
 | 
					<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"><</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">"stylesheet"</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"><</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">"stylesheet"</span> 
 | 
				
			||||||
</span></span><span class="line"><span class="cl"><span class="na">href</span><span class="o">=</span><span class="s">"css/styles.css?v=ab184410c10c1adfb8b85b03b316f72b"</span> 
 | 
					</span></span><span class="line"><span class="cl"><span class="na">href</span><span class="o">=</span><span class="s">"css/styles.css?=ab184410c10c1adfb8b85b03b316f72b"</span> 
 | 
				
			||||||
</span></span><span class="line"><span class="cl"><span class="p">/></span>
 | 
					</span></span><span class="line"><span class="cl"><span class="p">/></span>
 | 
				
			||||||
</span></span></code></pre></div><p>Now I just need to add the build script to my Jenkinsfile…</p>
 | 
					</span></span></code></pre></div><p>Now I just need to add the build script to my Jenkinsfile…</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">'build'</span><span class="o">){</span>
 | 
					<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">'build'</span><span class="o">){</span>
 | 
				
			||||||
| 
						 | 
					@ -94,7 +93,7 @@
 | 
				
			||||||
  <div>
 | 
					  <div>
 | 
				
			||||||
    <div>Tags:</div>
 | 
					    <div>Tags:</div>
 | 
				
			||||||
    <ul class="post-tags">
 | 
					    <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/html/">Html</a></li>
 | 
				
			||||||
        <li><a href="/tags/linux/">Linux</a></li>
 | 
					        <li><a href="/tags/linux/">Linux</a></li>
 | 
				
			||||||
    </ul>
 | 
					    </ul>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@
 | 
				
			||||||
<title>
 | 
					<title>
 | 
				
			||||||
  Posts | Coding with Andrzej
 | 
					  Posts | Coding with Andrzej
 | 
				
			||||||
</title>
 | 
					</title>
 | 
				
			||||||
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +29,7 @@
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
  <header>
 | 
					  <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>
 | 
					  <nav>
 | 
				
			||||||
    <ul>
 | 
					    <ul>
 | 
				
			||||||
| 
						 | 
					@ -58,25 +57,8 @@
 | 
				
			||||||
    <ul class="page-list">
 | 
					    <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+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 — mine usually are — 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>
 | 
					<li>
 | 
				
			||||||
    <h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
 | 
					    <h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
       
 | 
					 | 
				
			||||||
      <time datetime="2024-11-14T14:24:21+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><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 – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
 | 
					<p>I pushed some changes incorporating images for the first time (I know – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… 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 “this is obviously a cache problem”, and you’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’s machines? <strong>I needed to cache-bust.</strong></p>
 | 
					<p>The experienced computer touchers amongst you will be saying “this is obviously a cache problem”, and you’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’s machines? <strong>I needed to cache-bust.</strong></p>
 | 
				
			||||||
| 
						 | 
					@ -87,10 +69,6 @@
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
<li>
 | 
					<li>
 | 
				
			||||||
    <h2 class="center"><a href="/posts/permissions-strike-again/">Permissions strike again</a></h2>
 | 
					    <h2 class="center"><a href="/posts/permissions-strike-again/">Permissions strike again</a></h2>
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
       
 | 
					 | 
				
			||||||
      <time datetime="2024-11-13T11:53:13+01:00">November 13, 2024</time>
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
    <p>Configuring Apache really isn’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’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>Configuring Apache really isn’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’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><em><strong>And it almost always has to do with permissions.</strong></em></p>
 | 
				
			||||||
<p>So, I’m writing this post both as a means of christening this devlog (<a href="https://demos.ajstepien.xyz">Hi! I’m Andrzej! Hire me!</a>) and also as a reminder to myself that <em>the home folder is not executable by default.</em></p>
 | 
					<p>So, I’m writing this post both as a means of christening this devlog (<a href="https://demos.ajstepien.xyz">Hi! I’m Andrzej! Hire me!</a>) and also as a reminder to myself that <em>the home folder is not executable by default.</em></p>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,31 +2,24 @@
 | 
				
			||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
					<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
				
			||||||
  <channel>
 | 
					  <channel>
 | 
				
			||||||
    <title>Posts on Coding with Andrzej</title>
 | 
					    <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>
 | 
					    <description>Recent content in Posts on Coding with Andrzej</description>
 | 
				
			||||||
    <generator>Hugo</generator>
 | 
					    <generator>Hugo</generator>
 | 
				
			||||||
    <language>en-us</language>
 | 
					    <language>en-us</language>
 | 
				
			||||||
    <lastBuildDate>Fri, 15 Nov 2024 22:33:10 +0100</lastBuildDate>
 | 
					    <lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
 | 
				
			||||||
    <atom:link href="http://devlog.ajstepien.xyz/posts/index.xml" rel="self" type="application/rss+xml" />
 | 
					    <atom:link href="http://192.168.70/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><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></description>
 | 
					 | 
				
			||||||
    </item>
 | 
					 | 
				
			||||||
    <item>
 | 
					    <item>
 | 
				
			||||||
      <title>Invalidating the browser cache</title>
 | 
					      <title>Invalidating the browser cache</title>
 | 
				
			||||||
      <link>http://devlog.ajstepien.xyz/posts/cache-busting/</link>
 | 
					      <link>http://192.168.70/posts/cache-busting/</link>
 | 
				
			||||||
      <pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
 | 
					      <pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
 | 
				
			||||||
      <guid>http://devlog.ajstepien.xyz/posts/cache-busting/</guid>
 | 
					      <guid>http://192.168.70/posts/cache-busting/</guid>
 | 
				
			||||||
      <description><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></description>
 | 
					      <description><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></description>
 | 
				
			||||||
    </item>
 | 
					    </item>
 | 
				
			||||||
    <item>
 | 
					    <item>
 | 
				
			||||||
      <title>Permissions strike again</title>
 | 
					      <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>
 | 
					      <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><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></description>
 | 
					      <description><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></description>
 | 
				
			||||||
    </item>
 | 
					    </item>
 | 
				
			||||||
  </channel>
 | 
					  </channel>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@
 | 
				
			||||||
<title>
 | 
					<title>
 | 
				
			||||||
  Permissions strike again | Coding with Andrzej
 | 
					  Permissions strike again | Coding with Andrzej
 | 
				
			||||||
</title>
 | 
					</title>
 | 
				
			||||||
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +29,7 @@
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
  <header>
 | 
					  <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>
 | 
					  <nav>
 | 
				
			||||||
    <ul>
 | 
					    <ul>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,33 +2,30 @@
 | 
				
			||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
 | 
					<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
 | 
				
			||||||
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
 | 
					  xmlns:xhtml="http://www.w3.org/1999/xhtml">
 | 
				
			||||||
  <url>
 | 
					  <url>
 | 
				
			||||||
    <loc>http://devlog.ajstepien.xyz/tags/css/</loc>
 | 
					    <loc>http://192.168.70/tags/css/</loc>
 | 
				
			||||||
    <lastmod>2024-11-15T22:33:10+01:00</lastmod>
 | 
					    <lastmod>2024-11-13T14:24:21+01:00</lastmod>
 | 
				
			||||||
  </url><url>
 | 
					  </url><url>
 | 
				
			||||||
    <loc>http://devlog.ajstepien.xyz/tags/linux/</loc>
 | 
					    <loc>http://192.168.70/tags/html/</loc>
 | 
				
			||||||
    <lastmod>2024-11-15T22:33:10+01:00</lastmod>
 | 
					    <lastmod>2024-11-13T14:24:21+01:00</lastmod>
 | 
				
			||||||
  </url><url>
 | 
					  </url><url>
 | 
				
			||||||
    <loc>http://devlog.ajstepien.xyz/posts/cache-busting-2/</loc>
 | 
					    <loc>http://192.168.70/posts/cache-busting/</loc>
 | 
				
			||||||
    <lastmod>2024-11-15T22:33:10+01:00</lastmod>
 | 
					    <lastmod>2024-11-13T14:24:21+01:00</lastmod>
 | 
				
			||||||
  </url><url>
 | 
					  </url><url>
 | 
				
			||||||
    <loc>http://devlog.ajstepien.xyz/tags/</loc>
 | 
					    <loc>http://192.168.70/tags/linux/</loc>
 | 
				
			||||||
    <lastmod>2024-11-15T22:33:10+01:00</lastmod>
 | 
					    <lastmod>2024-11-13T14:24:21+01:00</lastmod>
 | 
				
			||||||
  </url><url>
 | 
					  </url><url>
 | 
				
			||||||
    <loc>http://devlog.ajstepien.xyz/tags/html/</loc>
 | 
					    <loc>http://192.168.70/tags/</loc>
 | 
				
			||||||
    <lastmod>2024-11-14T14:24:21+01:00</lastmod>
 | 
					    <lastmod>2024-11-13T14:24:21+01:00</lastmod>
 | 
				
			||||||
  </url><url>
 | 
					  </url><url>
 | 
				
			||||||
    <loc>http://devlog.ajstepien.xyz/posts/cache-busting/</loc>
 | 
					    <loc>http://192.168.70/posts/permissions-strike-again/</loc>
 | 
				
			||||||
    <lastmod>2024-11-14T14:24:21+01:00</lastmod>
 | 
					 | 
				
			||||||
  </url><url>
 | 
					 | 
				
			||||||
    <loc>http://devlog.ajstepien.xyz/posts/permissions-strike-again/</loc>
 | 
					 | 
				
			||||||
    <lastmod>2024-11-13T11:53:13+01:00</lastmod>
 | 
					    <lastmod>2024-11-13T11:53:13+01:00</lastmod>
 | 
				
			||||||
  </url><url>
 | 
					  </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>
 | 
					    <lastmod>2023-01-01T08:30:00-07:00</lastmod>
 | 
				
			||||||
  </url><url>
 | 
					  </url><url>
 | 
				
			||||||
    <loc>http://devlog.ajstepien.xyz/</loc>
 | 
					    <loc>http://192.168.70/</loc>
 | 
				
			||||||
    <lastmod>2023-01-01T08:00:00-07:00</lastmod>
 | 
					    <lastmod>2023-01-01T08:00:00-07:00</lastmod>
 | 
				
			||||||
  </url><url>
 | 
					  </url><url>
 | 
				
			||||||
    <loc>http://devlog.ajstepien.xyz/categories/</loc>
 | 
					    <loc>http://192.168.70/categories/</loc>
 | 
				
			||||||
  </url>
 | 
					  </url>
 | 
				
			||||||
</urlset>
 | 
					</urlset>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,9 +4,8 @@
 | 
				
			||||||
  <meta charset="utf-8" />
 | 
					  <meta charset="utf-8" />
 | 
				
			||||||
<meta name="viewport" content="width=device-width" />
 | 
					<meta name="viewport" content="width=device-width" />
 | 
				
			||||||
<title>
 | 
					<title>
 | 
				
			||||||
  CSS | Coding with Andrzej
 | 
					  Css | Coding with Andrzej
 | 
				
			||||||
</title>
 | 
					</title>
 | 
				
			||||||
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +29,7 @@
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
  <header>
 | 
					  <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>
 | 
					  <nav>
 | 
				
			||||||
    <ul>
 | 
					    <ul>
 | 
				
			||||||
| 
						 | 
					@ -50,7 +49,7 @@
 | 
				
			||||||
  </header>
 | 
					  </header>
 | 
				
			||||||
  <main>
 | 
					  <main>
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
  <h1>CSS</h1>
 | 
					  <h1>Css</h1>
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
| 
						 | 
					@ -58,25 +57,8 @@
 | 
				
			||||||
    <ul class="page-list">
 | 
					    <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+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 — mine usually are — 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>
 | 
					<li>
 | 
				
			||||||
    <h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
 | 
					    <h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
       
 | 
					 | 
				
			||||||
      <time datetime="2024-11-14T14:24:21+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><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 – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
 | 
					<p>I pushed some changes incorporating images for the first time (I know – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… 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 “this is obviously a cache problem”, and you’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’s machines? <strong>I needed to cache-bust.</strong></p>
 | 
					<p>The experienced computer touchers amongst you will be saying “this is obviously a cache problem”, and you’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’s machines? <strong>I needed to cache-bust.</strong></p>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,25 +1,18 @@
 | 
				
			||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 | 
					<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 | 
				
			||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
					<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
				
			||||||
  <channel>
 | 
					  <channel>
 | 
				
			||||||
    <title>CSS on Coding with Andrzej</title>
 | 
					    <title>Css on Coding with Andrzej</title>
 | 
				
			||||||
    <link>http://devlog.ajstepien.xyz/tags/css/</link>
 | 
					    <link>http://192.168.70/tags/css/</link>
 | 
				
			||||||
    <description>Recent content in CSS on Coding with Andrzej</description>
 | 
					    <description>Recent content in Css on Coding with Andrzej</description>
 | 
				
			||||||
    <generator>Hugo</generator>
 | 
					    <generator>Hugo</generator>
 | 
				
			||||||
    <language>en-us</language>
 | 
					    <language>en-us</language>
 | 
				
			||||||
    <lastBuildDate>Fri, 15 Nov 2024 22:33:10 +0100</lastBuildDate>
 | 
					    <lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
 | 
				
			||||||
    <atom:link href="http://devlog.ajstepien.xyz/tags/css/index.xml" rel="self" type="application/rss+xml" />
 | 
					    <atom:link href="http://192.168.70/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><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></description>
 | 
					 | 
				
			||||||
    </item>
 | 
					 | 
				
			||||||
    <item>
 | 
					    <item>
 | 
				
			||||||
      <title>Invalidating the browser cache</title>
 | 
					      <title>Invalidating the browser cache</title>
 | 
				
			||||||
      <link>http://devlog.ajstepien.xyz/posts/cache-busting/</link>
 | 
					      <link>http://192.168.70/posts/cache-busting/</link>
 | 
				
			||||||
      <pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
 | 
					      <pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
 | 
				
			||||||
      <guid>http://devlog.ajstepien.xyz/posts/cache-busting/</guid>
 | 
					      <guid>http://192.168.70/posts/cache-busting/</guid>
 | 
				
			||||||
      <description><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></description>
 | 
					      <description><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></description>
 | 
				
			||||||
    </item>
 | 
					    </item>
 | 
				
			||||||
  </channel>
 | 
					  </channel>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@
 | 
				
			||||||
<title>
 | 
					<title>
 | 
				
			||||||
  Html | Coding with Andrzej
 | 
					  Html | Coding with Andrzej
 | 
				
			||||||
</title>
 | 
					</title>
 | 
				
			||||||
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +29,7 @@
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
  <header>
 | 
					  <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>
 | 
					  <nav>
 | 
				
			||||||
    <ul>
 | 
					    <ul>
 | 
				
			||||||
| 
						 | 
					@ -60,10 +59,6 @@
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
<li>
 | 
					<li>
 | 
				
			||||||
    <h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
 | 
					    <h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
       
 | 
					 | 
				
			||||||
      <time datetime="2024-11-14T14:24:21+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><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 – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
 | 
					<p>I pushed some changes incorporating images for the first time (I know – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… 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 “this is obviously a cache problem”, and you’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’s machines? <strong>I needed to cache-bust.</strong></p>
 | 
					<p>The experienced computer touchers amongst you will be saying “this is obviously a cache problem”, and you’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’s machines? <strong>I needed to cache-bust.</strong></p>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,17 +2,17 @@
 | 
				
			||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
					<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
				
			||||||
  <channel>
 | 
					  <channel>
 | 
				
			||||||
    <title>Html on Coding with Andrzej</title>
 | 
					    <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>
 | 
					    <description>Recent content in Html on Coding with Andrzej</description>
 | 
				
			||||||
    <generator>Hugo</generator>
 | 
					    <generator>Hugo</generator>
 | 
				
			||||||
    <language>en-us</language>
 | 
					    <language>en-us</language>
 | 
				
			||||||
    <lastBuildDate>Thu, 14 Nov 2024 14:24:21 +0100</lastBuildDate>
 | 
					    <lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
 | 
				
			||||||
    <atom:link href="http://devlog.ajstepien.xyz/tags/html/index.xml" rel="self" type="application/rss+xml" />
 | 
					    <atom:link href="http://192.168.70/tags/html/index.xml" rel="self" type="application/rss+xml" />
 | 
				
			||||||
    <item>
 | 
					    <item>
 | 
				
			||||||
      <title>Invalidating the browser cache</title>
 | 
					      <title>Invalidating the browser cache</title>
 | 
				
			||||||
      <link>http://devlog.ajstepien.xyz/posts/cache-busting/</link>
 | 
					      <link>http://192.168.70/posts/cache-busting/</link>
 | 
				
			||||||
      <pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
 | 
					      <pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
 | 
				
			||||||
      <guid>http://devlog.ajstepien.xyz/posts/cache-busting/</guid>
 | 
					      <guid>http://192.168.70/posts/cache-busting/</guid>
 | 
				
			||||||
      <description><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></description>
 | 
					      <description><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></description>
 | 
				
			||||||
    </item>
 | 
					    </item>
 | 
				
			||||||
  </channel>
 | 
					  </channel>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@
 | 
				
			||||||
<title>
 | 
					<title>
 | 
				
			||||||
  Tags | Coding with Andrzej
 | 
					  Tags | Coding with Andrzej
 | 
				
			||||||
</title>
 | 
					</title>
 | 
				
			||||||
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +29,7 @@
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
  <header>
 | 
					  <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>
 | 
					  <nav>
 | 
				
			||||||
    <ul>
 | 
					    <ul>
 | 
				
			||||||
| 
						 | 
					@ -60,18 +59,7 @@
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
<li>
 | 
					<li>
 | 
				
			||||||
    <h2 class="center"><a href="/tags/css/">CSS</a></h2>
 | 
					    <h2 class="center"><a href="/tags/css/">Css</a></h2>
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
</li>
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
<li>
 | 
					 | 
				
			||||||
    <h2 class="center"><a href="/tags/linux/">Linux</a></h2>
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
| 
						 | 
					@ -82,6 +70,11 @@
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					</li>
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					<li>
 | 
				
			||||||
 | 
					    <h2 class="center"><a href="/tags/linux/">Linux</a></h2>
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
</li>
 | 
					</li>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,31 +2,31 @@
 | 
				
			||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
					<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
				
			||||||
  <channel>
 | 
					  <channel>
 | 
				
			||||||
    <title>Tags on Coding with Andrzej</title>
 | 
					    <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>
 | 
					    <description>Recent content in Tags on Coding with Andrzej</description>
 | 
				
			||||||
    <generator>Hugo</generator>
 | 
					    <generator>Hugo</generator>
 | 
				
			||||||
    <language>en-us</language>
 | 
					    <language>en-us</language>
 | 
				
			||||||
    <lastBuildDate>Fri, 15 Nov 2024 22:33:10 +0100</lastBuildDate>
 | 
					    <lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
 | 
				
			||||||
    <atom:link href="http://devlog.ajstepien.xyz/tags/index.xml" rel="self" type="application/rss+xml" />
 | 
					    <atom:link href="http://192.168.70/tags/index.xml" rel="self" type="application/rss+xml" />
 | 
				
			||||||
    <item>
 | 
					    <item>
 | 
				
			||||||
      <title>CSS</title>
 | 
					      <title>Css</title>
 | 
				
			||||||
      <link>http://devlog.ajstepien.xyz/tags/css/</link>
 | 
					      <link>http://192.168.70/tags/css/</link>
 | 
				
			||||||
      <pubDate>Fri, 15 Nov 2024 22:33:10 +0100</pubDate>
 | 
					      <pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
 | 
				
			||||||
      <guid>http://devlog.ajstepien.xyz/tags/css/</guid>
 | 
					      <guid>http://192.168.70/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>
 | 
					 | 
				
			||||||
      <description></description>
 | 
					      <description></description>
 | 
				
			||||||
    </item>
 | 
					    </item>
 | 
				
			||||||
    <item>
 | 
					    <item>
 | 
				
			||||||
      <title>Html</title>
 | 
					      <title>Html</title>
 | 
				
			||||||
      <link>http://devlog.ajstepien.xyz/tags/html/</link>
 | 
					      <link>http://192.168.70/tags/html/</link>
 | 
				
			||||||
      <pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
 | 
					      <pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
 | 
				
			||||||
      <guid>http://devlog.ajstepien.xyz/tags/html/</guid>
 | 
					      <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>
 | 
					      <description></description>
 | 
				
			||||||
    </item>
 | 
					    </item>
 | 
				
			||||||
  </channel>
 | 
					  </channel>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@
 | 
				
			||||||
<title>
 | 
					<title>
 | 
				
			||||||
  Linux | Coding with Andrzej
 | 
					  Linux | Coding with Andrzej
 | 
				
			||||||
</title>
 | 
					</title>
 | 
				
			||||||
<link rel="alternate" type="application/rss+xml" href="http://devlog.ajstepien.xyz//index.xml" title="Coding with Andrzej">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +29,7 @@
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
  <header>
 | 
					  <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>
 | 
					  <nav>
 | 
				
			||||||
    <ul>
 | 
					    <ul>
 | 
				
			||||||
| 
						 | 
					@ -58,25 +57,8 @@
 | 
				
			||||||
    <ul class="page-list">
 | 
					    <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+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 — mine usually are — 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>
 | 
					<li>
 | 
				
			||||||
    <h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
 | 
					    <h2 class="center"><a href="/posts/cache-busting/">Invalidating the browser cache</a></h2>
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
       
 | 
					 | 
				
			||||||
      <time datetime="2024-11-14T14:24:21+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><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 – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
 | 
					<p>I pushed some changes incorporating images for the first time (I know – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… 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 “this is obviously a cache problem”, and you’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’s machines? <strong>I needed to cache-bust.</strong></p>
 | 
					<p>The experienced computer touchers amongst you will be saying “this is obviously a cache problem”, and you’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’s machines? <strong>I needed to cache-bust.</strong></p>
 | 
				
			||||||
| 
						 | 
					@ -87,10 +69,6 @@
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
<li>
 | 
					<li>
 | 
				
			||||||
    <h2 class="center"><a href="/posts/permissions-strike-again/">Permissions strike again</a></h2>
 | 
					    <h2 class="center"><a href="/posts/permissions-strike-again/">Permissions strike again</a></h2>
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
       
 | 
					 | 
				
			||||||
      <time datetime="2024-11-13T11:53:13+01:00">November 13, 2024</time>
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
    <p>Configuring Apache really isn’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’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>Configuring Apache really isn’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’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><em><strong>And it almost always has to do with permissions.</strong></em></p>
 | 
				
			||||||
<p>So, I’m writing this post both as a means of christening this devlog (<a href="https://demos.ajstepien.xyz">Hi! I’m Andrzej! Hire me!</a>) and also as a reminder to myself that <em>the home folder is not executable by default.</em></p>
 | 
					<p>So, I’m writing this post both as a means of christening this devlog (<a href="https://demos.ajstepien.xyz">Hi! I’m Andrzej! Hire me!</a>) and also as a reminder to myself that <em>the home folder is not executable by default.</em></p>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,31 +2,24 @@
 | 
				
			||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
					<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 | 
				
			||||||
  <channel>
 | 
					  <channel>
 | 
				
			||||||
    <title>Linux on Coding with Andrzej</title>
 | 
					    <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>
 | 
					    <description>Recent content in Linux on Coding with Andrzej</description>
 | 
				
			||||||
    <generator>Hugo</generator>
 | 
					    <generator>Hugo</generator>
 | 
				
			||||||
    <language>en-us</language>
 | 
					    <language>en-us</language>
 | 
				
			||||||
    <lastBuildDate>Fri, 15 Nov 2024 22:33:10 +0100</lastBuildDate>
 | 
					    <lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
 | 
				
			||||||
    <atom:link href="http://devlog.ajstepien.xyz/tags/linux/index.xml" rel="self" type="application/rss+xml" />
 | 
					    <atom:link href="http://192.168.70/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><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></description>
 | 
					 | 
				
			||||||
    </item>
 | 
					 | 
				
			||||||
    <item>
 | 
					    <item>
 | 
				
			||||||
      <title>Invalidating the browser cache</title>
 | 
					      <title>Invalidating the browser cache</title>
 | 
				
			||||||
      <link>http://devlog.ajstepien.xyz/posts/cache-busting/</link>
 | 
					      <link>http://192.168.70/posts/cache-busting/</link>
 | 
				
			||||||
      <pubDate>Thu, 14 Nov 2024 14:24:21 +0100</pubDate>
 | 
					      <pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
 | 
				
			||||||
      <guid>http://devlog.ajstepien.xyz/posts/cache-busting/</guid>
 | 
					      <guid>http://192.168.70/posts/cache-busting/</guid>
 | 
				
			||||||
      <description><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></description>
 | 
					      <description><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></description>
 | 
				
			||||||
    </item>
 | 
					    </item>
 | 
				
			||||||
    <item>
 | 
					    <item>
 | 
				
			||||||
      <title>Permissions strike again</title>
 | 
					      <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>
 | 
					      <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><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></description>
 | 
					      <description><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></description>
 | 
				
			||||||
    </item>
 | 
					    </item>
 | 
				
			||||||
  </channel>
 | 
					  </channel>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,12 +12,6 @@
 | 
				
			||||||
  {{ range .Pages }}
 | 
					  {{ range .Pages }}
 | 
				
			||||||
<li>
 | 
					<li>
 | 
				
			||||||
    <h2 class="center"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
 | 
					    <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 }}
 | 
					    {{ .Summary }}
 | 
				
			||||||
    {{if $isTags}}
 | 
					    {{if $isTags}}
 | 
				
			||||||
    {{else}}
 | 
					    {{else}}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,5 +4,4 @@
 | 
				
			||||||
  {{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title
 | 
					  {{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title
 | 
				
			||||||
  site.Title }}{{ end }}
 | 
					  site.Title }}{{ end }}
 | 
				
			||||||
</title>
 | 
					</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" . }}
 | 
					{{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue