# Removed CDN, but discourse still points to it in browser cache?

**URL:** https://meta.discourse.org/t/removed-cdn-but-discourse-still-points-to-it-in-browser-cache/292864
**Category:** Self-hosting
**Tags:** cdn
**Created:** [January 25, 2024, 5:47am UTC](https://meta.discourse.org/t/removed-cdn-but-discourse-still-points-to-it-in-browser-cache/292864 "2024-01-25T05:47:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sweetbeems](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@sweetbeems](https://meta.discourse.org/u/sweetbeems)
#### Post date: [January 25, 2024, 5:47am UTC](https://meta.discourse.org/t/removed-cdn-but-discourse-still-points-to-it-in-browser-cache/292864/1 "2024-01-25T05:47:05Z")

</div>

I unfortunately changed my discourse server’s ip address, which has caused issues with my cloudfront domain.

So, I commented out DISCOURSE\_CDN\_URL from the yaml file and rebuilt. However, when I go to the discourse app with a browser cache (i.e. not incognito), the html contains my cloudfront url and I get the wheel of death.

I originally thought it might be a post baking issue, but then incognito wouldn’t work either.

Is there a way to bust the browser cache?

discourse app: [https://forums.learnnatively.com/](https://forums.learnnatively.com/)  
bad CDN url: [https://deyr2qldo994j.cloudfront.net/](https://deyr2qldo994j.cloudfront.net/)

Any help would be great, thanks!

Edit: Just to be clear all my images / uploads are in a different CDN which is not an issue. That cdn is [https://do4ryrayvtpwi.cloudfront.net/](https://do4ryrayvtpwi.cloudfront.net/). So I don’t think post baking should be an issue?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 25, 2024, 10:52am UTC](https://meta.discourse.org/t/removed-cdn-but-discourse-still-points-to-it-in-browser-cache/292864/2 "2024-01-25T10:52:11Z")

</div>

> [@sweetbeems](#):
>
> I unfortunately changed my discourse server’s ip address, which has caused issues with my cloudfront domain

If that’s the case then you just need to wait for dns to propagate. Or maybe dns is broken in some way that cloud front is using the old dns.

It’s always dns.

> [@sweetbeems](#):
>
> Is there a way to bust the browser cache?

Google “clear browser cache browser name”

If you’re going to get rid of the CDN, you must rebuild so that the assets got precompiled, and to do need to rebake all posts.

---

<div class="post-metadata">

### Author: ![sweetbeems](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@sweetbeems](https://meta.discourse.org/u/sweetbeems)
#### Post date: [January 28, 2024, 3:44am UTC](https://meta.discourse.org/t/removed-cdn-but-discourse-still-points-to-it-in-browser-cache/292864/3 "2024-01-28T03:44:36Z")

</div>

Thanks for your responses!

> [@pfaffman](#):
>
> If you’re going to get rid of the CDN, you must rebuild so that the assets got precompiled, and to do need to rebake all posts.

That doesn’t seem to be the case with non-uploads cdn? It doesn’t seem that there’s any asset urls inside the baked post content as far as I can tell.

> [@pfaffman](#):
>
> Google “clear browser cache browser name”

Unfortunately that’s not really a solution for users, was hoping for something like a get param cache buster. Although I must admit, i’m not fully clear why the cache was impacting it.. there was just a difference between incognito & non-incognito behavior.

In any case, it seems to have resolved itself, as the DNS has full propagated.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [February 27, 2024, 3:45am UTC](https://meta.discourse.org/t/removed-cdn-but-discourse-still-points-to-it-in-browser-cache/292864/4 "2024-02-27T03:45:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
