Safari loading slow - kCFErrorDomainCFNetwork error 303 - "kCFErrorHTTPParseFailure"

I am a web developer, debugging an issue on a site for a client, and we're a bit stuck.


The website loads fine on all other browsers, but Safari runs into an issue where the page is just a white screen. It appears that the site uses a script to require visitors to have javascript running. This is not unusual as it's a well known mitigation against click-jacking vulnerabilities. However, Safari doesn't seem able to load any externally referenced CSS or Javascript. Which would fix the web page for the user. Without loading that, it just stays as a white page.


I personally use Linux for my desktop, but I have access to Browser Stack for debugging cross-platform issues, and here is what I am seeing. In iOS Safari, I get several errors in console with this warning:


Failed to load resource: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 303.)


Looking up "kCFErrorDomainCFNetwork error 303", that corresponds with "kCFErrorHTTPParseFailure"


This seems to correspond with all the CSS and JS assets simply not receiving any response from the server. No headers, and no timing information.


I look up that error, and I get this documentation page which is unfortunately is very light on detail. But just based on the name, I assume that there is some issue with the formatting of the http response from the server. It doesn't really tell me what though, and I've looked at it in a number of different ways, and haven't really been able to identify what exactly is wrong with the response precisely, and other browsers don't seem to have any problem with it.


I tried looking at the site also in MacOS Safari, albeit in the console, the entry shows as "Failed to load resource: cannot parse response"


I've found very few other references to these error codes in the support forums.


https://discussions.apple.com/thread/8323993?sortBy=rank

https://discussions.apple.com/thread/8112898?sortBy=rank

https://discussions.apple.com/thread/251440948?sortBy=rank

https://apple.stackexchange.com/questions/366448/safari-giving-kcferrordomaincfnetwork-error-303-when-visiting-a-site

https://www.quora.com/Why-does-Safari-give-me-a-kCFErrorDomainCFNetwork-error-303-when-browsing-some-sites


The only suggestions I find say to clear the history for that particular web page. But that's not something I can reasonably ask every site visitor to do.


I am asking the client system administrator to make sure the webserver (apache) and reverse proxy cache (varnish) software are up to date. It just seems very unusual, since this seemed fine for years, and we suddenly run into this last week (without making any updates to the site or software).



Posted on Jan 27, 2025 11:29 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 28, 2025 9:00 AM

We were able to get around the issue for now simply by disabling http 2 in the firewall tool we use. Not a true solution I suppose, but the site is working now. The lead I was trying to follow comes from this SO answer https://serverfault.com/a/937269/497308, it seems there is an issue with Safari when a server tries to negotiate http versions, when an http 2 connection has already been made.

Similar questions

1 reply
Question marked as Top-ranking reply

Jan 28, 2025 9:00 AM in response to johnbburg

We were able to get around the issue for now simply by disabling http 2 in the firewall tool we use. Not a true solution I suppose, but the site is working now. The lead I was trying to follow comes from this SO answer https://serverfault.com/a/937269/497308, it seems there is an issue with Safari when a server tries to negotiate http versions, when an http 2 connection has already been made.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Safari loading slow - kCFErrorDomainCFNetwork error 303 - "kCFErrorHTTPParseFailure"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.