Ask Daniel's CODEX · index

Server - Favicon Cache Clearing

Server - Favicon Cache Clearing


[1] DANIEL:

I have a windows web server, and a bunch of DNN current version websites. When I upload a favicon.ico file to the root of each website, even in the windows explorer, I see the old icon file, not the new one, even though the file size has changed to match the new icon file. I open the file in MS Paint, and yes, it is the new file. I delete my history on my web browser too. Nothing. I can dump cache on the website, restart it in iis , and yet nothing. How do I remove the old file from preview and download to other web browsers?


[2] GROK:

The issue you're describing has two distinct parts: the outdated thumbnail preview in Windows Explorer (a local OS caching problem) and the old favicon being served to browsers (likely a combination of server-side caching in IIS/DNN and browser-side caching). I'll address each separately with steps to resolve them. These are based on common solutions for DNN sites on IIS, where favicons can be stubborn due to aggressive caching at multiple levels.

Fixing the Outdated Preview in Windows Explorer

Windows caches file icons and thumbnails separately from the file contents, which is why Paint shows the new file but Explorer doesn't update. To force a refresh:

  1. Close all Explorer windows.
  2. Open File Explorer and navigate to %localappdata%\Microsoft\Windows\Explorer (paste this into the address bar).
  3. Delete all files named iconcache_*.db (e.g., iconcache_32.db, iconcache_256.db). You may need to show hidden files or run as admin if they're protected.
  4. Also, check the root folder of your website for a hidden Thumbs.db file and delete it if present.
  5. Open Task Manager (Ctrl+Shift+Esc), find "Windows Explorer" under Processes, right-click it, and select "Restart" (or run taskkill /f /im explorer.exe then start explorer.exe in Command Prompt as admin).
  6. Reopen Explorer and check the favicon.ico file—it should now show the updated thumbnail.

If this doesn't work, run the following in Command Prompt as admin: ie4uinit.exe -ClearIconCache (for Windows 10+).

Fixing the Old Favicon Being Served/Downloaded in Browsers

Since the file on disk is confirmed new (via file size and Paint), this is almost certainly caching on the server (IIS or DNN) or client (browser). DNN handles favicons per portal/site, and IIS can cache static files like .ico aggressively. Here's a step-by-step troubleshooting and fix process:

1. Confirm the Correct Placement in DNN

DNN (now known as DNN Platform or Evoq in recent versions) treats favicons differently based on whether it's a single-portal or multi-portal setup:

- Place it in the portal's subfolder, e.g., Portals\0\favicon.ico (where "0" is the portal ID—check in DNN admin under Host > Portals). - Alternatively (preferred in current versions): Log in to DNN as admin/host, go to Settings > Site Settings > Site Info/Appearance, and upload the new .ico file there. This stores it in the database and ensures it's portal-specific.

If your "bunch of websites" are separate IIS sites (not multi-portal in one DNN), repeat the root upload for each site's physical root.

2. Clear DNN-Specific Caching

DNN has its own caching layers for files and pages:

3. Clear/Disable IIS Caching for Static Files

IIS might be holding the old version in its output or kernel cache:

- Open IIS Manager, select your site. - Double-click Output Caching (under IIS section). - Click Edit Feature Settings in the Actions pane, uncheck "Enable cache" and "Enable kernel cache". - Or, add this to your site's web.config (in the root): `` <system.webServer> <caching enabled="false" enableKernelCache="false" /> </system.webServer> `` - For specific .ico disabling: In Output Caching, add a rule for extension ".ico" and set "Prevent all caching".

After changes, recycle the app pool: In IIS Manager, select Application Pools, right-click your site's pool, and choose Recycle.

4. Force Browsers to Download the New Version

Even if the server is fixed, browsers cache favicons for weeks/months:

5. Verify the Server is Serving the New

File

If none of this works, check DNN logs (Admin > Logs) for errors related to file saving, or ensure your DNN version is up to date—older versions had bugs with favicon uploads. For multi-site setups, confirm each site's bindings in IIS aren't sharing unintended paths. If it's a hosting provider, contact them to confirm no CDN/proxy caching is involved.<grok:render card_id="f97827" card_type="citation_card" type="render_inline_citation"> <argument name="citation_id">0</argument> </grok:render><grok:render card_id="9424c7" card_type="citation_card" type="render_inline_citation"> <argument name="citation_id">1</argument> </grok:render><grok:render card_id="934629" card_type="citation_card" type="render_inline_citation"> <argument name="citation_id">2</argument> </grok:render><grok:render card_id="115a0b" card_type="citation_card" type="render_inline_citation"> <argument name="citation_id">13</argument> </grok:render><grok:render card_id="bf5f15" card_type="citation_card" type="render_inline_citation"> <argument name="citation_id">28</argument> </grok:render><grok:render card_id="6ccaf2" card_type="citation_card" type="render_inline_citation"> <argument name="citation_id">30</argument> </grok:render><grok:render card_id="cda447" card_type="citation_card" type="render_inline_citation"> <argument name="citation_id">37</argument> </grok:render>


[3] DANIEL:

Thanks


[4] GROK:

You're welcome! If you run into any snags or need more help with those DNN sites, just let me know.

Ask Daniel's CODEX