I came across this Reddit post the other day:
And I remembered an issue I had the other day with a web front-end for an ASP.NET web site I was in charge of administering.
This particular issue was due to a site refresh. We had changed the front-end visuals, revamped the icons, etc. The problem was, many users were still seeing the old icons. A full refresh using CTRL-F5 fixed the issue, but we decided that this wasn’t really a viable solution.
I spent 3 days trying to fix this issue.
Some solutions we came up with included:
- Restarting the IIS Site: no change
- Adding the following tags to the _Layout template, as recommended in this Stack Overflow post: no change
<meta Http-Equiv="Cache-Control" Content="no-cache">
<meta Http-Equiv="Pragma" Content="no-cache">
<meta Http-Equiv="Expires" Content="0">
<meta Http-Equiv="Pragma-directive: no-cache">
<meta Http-Equiv="Cache-directive: no-cache">
- Adding a dummy query string to the file as recommended in this Stack Overflow post <img src="/image.png?dummy=20170701" /> No change
I was banging my head on the desk. Why could I not force the images to refresh for everyone?
And then, the next morning when I woke up… an epiphany!
Why not just rename the images?
30 seconds later, the problem was solved.
When you’re a programmer (or writing software, or developing a web site), these situations crop up all the time. You’ll strain your brain for extended periods of time, then the solution will pop into your head. In this case, it was simply a matter of looking at it from another angle. Other times, it’s just a typo. 20 years ago, I had an application that looked fine, but failed to launch. I spent hours trying to debug it, only to find that the error was in the IDE, and rebooting the machine fixed it. Aargh!
Sure, writing back-end stuff is hard. You need to sanitise your inputs, verify your data, detect logic errors when the code compiles but doesn’t run. You need to take performance issues into account. But writing front-end stuff is hard, too. That page/animation/GUI doesn’t create itself. A couple of <H1> tags aren’t going to cut it any more. Front-end developers deserve our respect because these days, they’re having to write code (even if it is “just” scripts) to make things work. You might not think of it as coding, but it’s definitely in the development spectrum.