A client has changed their branding slightly so I need to update the CSS and favicon. Favicons, particularly, seem to be very strongly cached so, to stop the client from thinking the work hasn’t been done, I would like to add a rule in the .htaccess that instructs something like…
“Take the request for /favicon.ico and instead serve up /favicon2.ico”
…and a similar rule for the CSS if possible.
I’m pretty sure I’ve seen this done before but I failed to make a note of it.
Redirects won’t help you with cached requests where the client doesn’t make a request to the server at all. The best solution is to change your HTML pages and add a query string with a version number to your favicons and other resources:
Then you can update the version number whenever the resource changes.