# CDN causes white screen

**URL:** https://meta.discourse.org/t/cdn-causes-white-screen/79070
**Category:** Self-hosting
**Created:** [January 26, 2018, 7:22am UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070 "2018-01-26T07:22:34Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Vencent](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vencent/32/120037_2.png) [@Vencent](https://meta.discourse.org/u/Vencent)
#### Post date: [January 26, 2018, 7:22am UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/1 "2018-01-26T07:22:34Z")

</div>

White screen often happens to my site with CDN. And clearing CDN cache manually can solve the problem. Does anybody run into the same problem?

The errors in browser Console is like ‘unexpected token’ or something like that. I just recovered from the problem by clearing cache and regrettably didn’t take a screenshot.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [January 26, 2018, 8:58am UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/2 "2018-01-26T08:58:08Z")

</div>

Are you behind Cloudflare? If so, do you have it Rocket Loader or additional minimization enabled? These regularly cause issues and we recommend you disable them.

---

<div class="post-metadata">

### Author: ![Vencent](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vencent/32/120037_2.png) [@Vencent](https://meta.discourse.org/u/Vencent)
#### Post date: [January 26, 2018, 9:10am UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/3 "2018-01-26T09:10:45Z")

</div>

> [@fefrei](#):
>
> Are you behind Cloudflare?

No. But it is behind Nginx. Will this affect?

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [January 26, 2018, 9:25am UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/4 "2018-01-26T09:25:06Z")

</div>

If you’re _just_ behind an Nginx instance with a configuration [like this](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247), this shouldn’t cause these kinds of issues.

We need more details to help you. If this happens again, can you capture details of the error? What URL is your Discourse instance available at? What exactly do you mean by “clearing CDN cache” – can you describe what you’re doing, exactly?

---

<div class="post-metadata">

### Author: ![Vencent](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vencent/32/120037_2.png) [@Vencent](https://meta.discourse.org/u/Vencent)
#### Post date: [January 26, 2018, 10:11am UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/5 "2018-01-26T10:11:17Z")

</div>

My Nginx configuration is basically the same as that.  
I’ll try to capture details as much as possible if this happens again. Thanks for your generous help.

---

<div class="post-metadata">

### Author: ![Vencent](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vencent/32/120037_2.png) [@Vencent](https://meta.discourse.org/u/Vencent)
#### Post date: [January 26, 2018, 2:02pm UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/6 "2018-01-26T14:02:54Z")

</div>

Unfortunately, the problem occurs again.

These are the errors in Chrome console.

 ![WX20180126-215321%402x](https://global.discourse-cdn.com/meta/original/3X/5/b/5beb75aa0f21cb89a80a92369de0190a44c6b6fb.png)

And in Safari:

 ![WX20180126-215344%402x](https://global.discourse-cdn.com/meta/original/3X/a/3/a31738b671bc85feb1188c92183d5906f483f6f9.png)

My Discourse instance is [https://base.admirable.one](https://base.admirable.one)

Here is what I found: the `Content-Encoding` of Javascript file handled by CDN is `gzip`. I guess it should be `br` to function properly? So I think maybe the problem is related to my CDN’s cache.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [January 26, 2018, 2:14pm UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/7 "2018-01-26T14:14:04Z")

</div>

What CDN are you behind?

---

<div class="post-metadata">

### Author: ![Vencent](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vencent/32/120037_2.png) [@Vencent](https://meta.discourse.org/u/Vencent)
#### Post date: [January 26, 2018, 2:30pm UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/8 "2018-01-26T14:30:27Z")

</div>

I use Qiniu as my CDN service provider. I’ll try if delete and recreate the project in their panel can solve.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [January 26, 2018, 2:40pm UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/9 "2018-01-26T14:40:37Z")

</div>

Look for settings in their control panel that affect Discourse’s files, like minimization options, and disable them.

---

<div class="post-metadata">

### Author: ![rishabhlakhotia](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rishabhlakhotia/32/192820_2.png) [@rishabhlakhotia](https://meta.discourse.org/u/rishabhlakhotia)
#### Post date: [December 8, 2019, 1:16pm UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/10 "2019-12-08T13:16:02Z")

</div>

I have done the same as above, purged the cache too but still I get a blank white screen. When I use CloudFront the problem doesn’t occur but when using Hostry or BunnyCDN, the screen remains white.

---

<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: [September 17, 2023, 10:37am UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/11 "2023-09-17T10:37:54Z")

</div>



---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [September 21, 2023, 9:11pm UTC](https://meta.discourse.org/t/cdn-causes-white-screen/79070/12 "2023-09-21T21:11:17Z")

</div>


