Help with white screen when using any cdn

AI-generated summary

Help with white screen when using any CDN

The discussion revolves around HelloItsGav’s issue with a white screen appearing when using a CDN (Stackpath or BunnyCDN) with their Discourse site. Despite the edge address loading the site correctly, visiting the domain results in a white screen.

HelloItsGav discovered console errors with “invalid character” messages and found corresponding JavaScript files filled with gibberish characters. Changing the “host header” to “dynamic” resolves the issue but causes delays due to redirected static files.

Mittineague suspects a mis-matched character encoding issue and advises checking language and character encoding settings. HelloItsGav hasn’t changed any default Discourse settings in this regard.

supermathie suggests that the issue might be due to compressed assets being treated as uncompressed by the browser, resulting in the gibberish characters.

hi, I have added my site to stackpath and added the ‘edge address’ to app.yml and rebuilt, now all of my static files direct to stackpath as expected. However when i go to my domain now I only see a white screen. i thought this might be a stackpath issue so I also tried these steps with bunnycdn (which has worked fine previously) and still I now only see a white screen.

my stackpath edge address however xxxxxx.stackpathcdn.com loads my site completely fine

does anyone know what this issue this? thanks

update: i checked console which is full of ‘invalid character’ messages, when i open the corresponding js files it is full of: ‘¾ØýÈOÝ´þäùKe˜žXÞ¬¬½õ’

also when i change the ‘host header’ to ‘dynamic’ the site will load at the original domain however this causes all the static files to redirect which causes big delays.

It’s the weekend so you may need to be patient for better help. But it looks like the problem involves mis-matched character encoding. I tend to have everything in UTF-8 — browsers, text editors, meta tags, database collation, etc. everthing

What language(s) / character encoding(s) are you working with?

Glaswegian. (That’ll be it, likely.)

Not entirely sure i understand but i haven’t changed any of the default discourse settings in that regard..

This sounds like you’re getting compressed assets but the browser is treating them as uncompressed and trying to interpret directly.