iOS doesn't load CSS sometimes when navigating between subdomains

Only seem to happen on iOS devices - sometimes external links open to within the same window but CSS isn’t loading. Strange and I can’t even seem to reproduce!

Looks like this:

Also found reports on other public discourse forums:

Since it was reported and fixed before I wonder if it can be related to a theme or theme component maybe? Would appreciate any help.

1 Like

What errors are shown in the network logs when the CSS fails to load?

As for it theoretically being a theme/component issue, have you tried safe mode?

no simply because I saw this behaviour a few times in the last two weeks, only on my iPhone and have heard the same from users but cannot reproduce, seems random.

this looks like an old bug. I can’t reproduce anywhere at the moment and all those linked topics are at least a year old. sounds like a forum that isn’t up to date.

1 Like

Thanks, but it’s running the latest beta update :frowning:

What was fixed in that bug? I wonder if perhaps there’s a component or theme that re-generated this bug?

I’m trying to catch it again, it seems to happen occasionally - not sure how to repro. It does happen though, only in iOS afaik.

I’m using multiple iOS devices, iphone 15 pro max, ipad Air 5th gen, Macbook Air M2 and I cannot reproduce this :thinking:

What model of device and iOS version are you using?

personally iphone 12 with the latest iOS 17.4

It only happens for links outside using html a href but even then it happens occasionally only?

Would love to know what was the bug that was fixed - so perhaps I could try and trigger something to reproduce it :confused:

How do those reports relate to problems with the CSS of Discourse Forums? The first one explicitly states:

the forum is not affected by this issue

1 Like

It seems to be the same behaviour - it’s when opening an external website from within the discourse. For example, opening from

That doesn’t sound like a problem the forum is causing then, if external sites are having issues.

I thought so too, however it seems to only happen when clicking through from the forum and because I found other posts I thought maybe someone can shed a light on this - could be an iOS issue. Was easier if it was not loading CSS every time and just sometimes :sweat_smile:

1 Like

@Lilly I wonder if you could share how discourse handles href and if there’s any particular way for iOS? This seems to be a Safari related issue, but it only ever happens from within discourse going out to another domain. That other domain isn’t being loaded as if discourse is trying to locally load the html of the requested page.

We’ve already tried forcing no-cache policy and playing around with www prefix. nothing seem to work. It’s exactly the issues mentioned here:

They had the main website load from their which caused the same partial page load.

Thanks in advance!

Our discourse is a subdomain ( for our main site (

For months now we’ve had iPhone users say that when clicking links from the sub domain (discourse) back to the main site, the page may not fetch CSS or JS but only HTML and therefore is unusable.

This does not happen every single time, but frequently enough so that they have to reload the page to fix it. By reloading they actually remain in discourse so they have to click again.

Looking at the access.log file of the nginx we can see that for some reason discourse tries to fetch the main domain files instead of index of the main domain.
Needless to say, discourse does not have these files and so the page is then broken.

This is from “access.log” of the nginx:

[19/May/2024:09:49:51 +0000] "" "GET /js/cart/cart.js?v=0.32 HTTP/2.0" "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Ribblr Mobile" "-" 429 230 "" - 0.000 "-" "-" "-" "-" "-" "-" "-"

[19/May/2024:09:49:51 +0000] "" "GET /css/footer_and_header.css?v=1.13 HTTP/2.0" "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Ribblr Mobile" "-" 404 7963 "" 0.019 0.019 "-" "-" "-" "-" "-" "-" "-"
[19/May/2024:09:49:51 +0000] "" "GET /css/common/jssocials.css?v=0.03 HTTP/2.0" "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Ribblr Mobile" "-" 404 7968 "" 0.020 0.020 "-" "-" "-" "-" "-" "-" "-"
[19/May/2024:09:49:51 +0000] "" "GET /js/common/lightslider.js?v=0.14 HTTP/2.0" "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Ribblr Mobile" "-" 404 7980 "" 0.020 0.020 "-" "-" "-" "-" "-" "-" "-"
[19/May/2024:09:49:51 +0000] "" "GET /js/common/jssocials.js HTTP/2.0" "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Ribblr Mobile" "-" 404 7978 "" 0.034 0.034 "-" "-" "-" "-" "-" "-" "-"

We tried using both href links and window.reload() but the issue remains the same. Once again, it only happens occasionally and only for iPhone users.

Any ideas why this happens and how it can be fixed?

1 Like

Is this the same issue you described here?

1 Like

yes! it needs to be merged :sweat_smile:

I think we now understand better what is wrong.


Wondering if some team members have any thoughts? @Lilly I know we’ve discussed here a couple months ago - maybe you have additional insights to share?

I think it’s the same issue as the discourse website I shared on my first post.

We have observed some strange issues like this. As far as we can tell, it must be a bug in Safari/WebKit. It should be impossible for this kind of ‘mixed site’ rendering to happen. We have filed a report with WebKit. (cc @pmusaraj)

If anyone can find a consistent way to reproduce the issue, that would almost certainly help to get the bug prioritised.


Any ideas for an external link workaround?
Both HTML HREF and JS window.replace behave the same :frowning:
(I’m sure the Fwd/Back are almost impossible to override)

1 Like

Sadly, I don’t have any ideas for a workaround. I tried deregistering service workers in case that was the conflicting reason, but it had no effect.

Currently I have switched to Safari Technology Preview locally. It seems to not have the issue, which may be an indicator that this is fixed in newer versions of Webkit. Or, it means that a fresh browser with a fresh cache doesn’t have the issues… hard to say.

We will monitor this and keep looking for fixes, the issues affects multiple people in the Discourse team and on different platforms (macOS, iOS, DiscourseHub app). Short of finding a magic fix, though, the best we can do here is follow the Webkit bug report and add additional information there, if relevant/useful.