Safari ajax request Failed to load resource: The network connection was lost
I'm receiving a message "Failed to load resource: The network connection was lost." in my application, which uses ajax requests to get content from server. This error is only in Safari, other browsers are ok.
I was searching last few hours and found that it can be due to http headers:
전송-부호화 : 청크됨
연결: keep-alive
내용-길이
I've found something similar: https://github.com/woothemes/woocommerce/issues/7176 On the bottom is told that they set
브라우저 일치 "Safari" neo keepalive
.htaccess에서
Is there any similar solution or settings for nginx server?
Thank you
JF
One of the reasons why it might happen is the way Safari handles some SSL certificates (mainly, LetsEncrypt). The solution is to put the line:
ssl_session_cache shared:SSL:10m;
to your nginx config.
Source: https://community.letsencrypt.org/t/apple-safari-browsers-fail-to-connect/3731/3
Had this trouble too with a form that ajax-posted and when that completed did a window.location.reload(true). Safari 13.0.3 would work the first time after a manual page refresh (seemed consistent) then would get "Failed to load resource: The network connection was lost." roughly 2 out of 3 clicks.
Changed the client to:
use ajax-get instead of post (with a unique query param value each time)
on completion set a timer so that window.location.reload(true) was not done inside the ajax completion handler
User reports that worked, not sure which one of those changes or both.
Hope this helps someone...
ReferenceURL : https://stackoverflow.com/questions/33895463/safari-ajax-request-failed-to-load-resource-the-network-connection-was-lost
'programing' 카테고리의 다른 글
MySQL - 사용자의 선택에 따라 열 '이름'을 선택합니다. 열 'id'와 'parent'의 행이 동일한 경우 (0) | 2023.09.07 |
---|---|
JSF 동적에는 Ajax 요청 사용이 포함됩니다. (0) | 2023.09.07 |
빌드 중에 호스트 볼륨을 도커 파일의 도커 컨테이너에 마운트하는 방법 (0) | 2023.09.07 |
Error dialog displayed when opening an excel file generated with EPPlus (0) | 2023.09.07 |
Chrome의 대용량 JSON 데이터 검사 (0) | 2023.09.07 |