Deleting home-background.png asset from developer portal does not remove the background image.

mvasquez
Participant II

I want just a plain color background, but even when I delete the asset the background still remains when I view the live portal. Wondering how to resolve this...

1 1 216
1 REPLY 1

It's due to caching.

Specifically, it looks like the browser is caching the image. When you delete the image "asset" from the portal configuration, it's really gone.

But if you had used the browser to view the portal at all, then the background image had been delivered with a header like this:

cache-control: max-age=2592000, public

That tells the browser, cache this image for 2592000 seconds. in other words, 30 days.

The browser will continue to rely on its cache for up to that amount of time. The way to avoid this is to clear the cache in the browser, or use a different browser (or a different computer to run the browser).

I just tried this on a new portal I created

  1. create the portal
  2. view it in a new browser tab; see the default background image
  3. back in the portal admin panel, delete the background image
  4. swap back to the portal tab; refresh. Still see the same background image!

Using Chrome dev tools I can see the image is being served from cache.

9034-from-memory-cache.png

When I tried from another computer, I saw the blank background as expected.