Failed to load resource: the server responded with a status of 503 (Service Unavailable) #116

Closed
opened 2024-02-18 02:57:55 +02:00 by nevfy · 3 comments
Collaborator

Tested on iOS Safari and Epiphany

Tested on iOS Safari and Epiphany
Poster
Collaborator

iOS

iOS
nevfy changed title from Images do not load on Webkit browsers to Failed to load resource: the server responded with a status of 503 (Service Unavailable) on Webkit browsers 2024-04-04 16:02:18 +03:00
nevfy changed title from Failed to load resource: the server responded with a status of 503 (Service Unavailable) on Webkit browsers to Failed to load resource: the server responded with a status of 503 (Service Unavailable) 2024-04-04 16:48:09 +03:00
Poster
Collaborator

503 errors happen in all browsers, it's just more noticeable on Apple devices.

iOS 16.7.4 Safari, Chrome

  • open the browser
  • open the main page
    • images do not display at all
  • reloading the page does not help
  • weird: page loads if you open it in telegram, after that you can reopen the page in safari and it loads the images

MacOS Sonoma 17.3 Safari, MacOS Ventura 16.5 Safari

  • open the browser
  • open the page
    • get 503 errors
    • images do not display
  • some images will display after reloading the page once, but most still won't
  • some images in the docs section load properly even on the first try
  • changing user-agent to firefox has no effect

Epiphany 45.3 (WebKitGTK 2.42.5 GStreamer 1.22.8)

  • open the browser
  • open the page
    • everything displays as intended, no errors
  • reload the page
    • everything is still fine
  • reload again
    • get 503 errors
    • some images fail to render, even if they were displayed normally on the first load
  • everything displays properly if I open the page from localhost

Firefox 123.0.1, Chromium 122.0.6261.128

  • open the browser
  • open the page
    • everything displays as intended, no errors
  • reloading with ctrl+r does not trigger 503 errors, page reloads, images display
  • reload the page with ctrl+shift+r once
    • get 503 errors
    • the page looks normal, images do not break (cached on first load?)
  • rarely some images in the bottom of the page do not load and do not return any error, reloading the page helps

Following the suggestion proposed by @harrymc (using Google public DNS) has completely destroyed all symptoms of poor page loading. According to @harrymc, it is due to faulty/slow DNS, and/or poor DNS caching strategies. More specifically, what caused this problem was a poor DNS, and what appears to be a rather hasty time-out protocol built into the webkit engine. These two factors are a recipe for disaster.

  • SVG not rendered in Safari
    • if this was the issue then the .png screenshots would always load and .svg will never render, which is not the case

It seems that Safari 13.1 does not render these SVGs within img tags.
Embedding the SVG with a HTML embed as did the trick.

  • Svg image element not displaying in Safari
    • should not affect .png which also do not always load
    • .svgs already have a viewBox and width & height
    • .svgs already have a content-type: content-typeimage/svg+xml, which is correct
[503 errors](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503) happen in all browsers, it's just more noticeable on Apple devices. ### iOS 16.7.4 Safari, Chrome * open the browser * open the main page - images do not display at all * reloading the page does not help * weird: page loads if you open it in telegram, after that you can reopen the page in safari and it loads the images ### MacOS Sonoma 17.3 Safari, MacOS Ventura 16.5 Safari * open the browser * open the page - get 503 errors - images do not display * some images will display after reloading the page once, but most still won't * some images in the docs section load properly even on the first try * [changing user-agent to firefox](url) has no effect ### Epiphany 45.3 (WebKitGTK 2.42.5 GStreamer 1.22.8) * open the browser * open the page - everything displays as intended, no errors * reload the page - everything is still fine * reload again - get 503 errors - some images fail to render, even if they were displayed normally on the first load * everything displays properly if I open the page from localhost ### Firefox 123.0.1, Chromium 122.0.6261.128 * open the browser * open the page - everything displays as intended, no errors * reloading with `ctrl+r` does not trigger 503 errors, page reloads, images display * reload the page with `ctrl+shift+r` once - get 503 errors - the page looks normal, images do not break (cached on first load?) * rarely some images in the bottom of the page do not load and do not return any error, reloading the page helps --- * [Webkit browsers inconsistently load webpage images/resources](https://superuser.com/questions/708064/webkit-browsers-inconsistently-load-webpage-images-resources) - console error is different > Following the suggestion proposed by @harrymc (using Google public DNS) has completely destroyed all symptoms of poor page loading. According to @harrymc, it is due to faulty/slow DNS, and/or poor DNS caching strategies. More specifically, what caused this problem was a poor DNS, and what appears to be a rather hasty time-out protocol built into the webkit engine. These two factors are a recipe for disaster. * [SVG not rendered in Safari](https://discourse.webflow.com/t/svg-not-rendered-in-safari/122536) - if this was the issue then the .png screenshots would always load and .svg will never render, which is not the case > It seems that Safari 13.1 does not render these SVGs within img tags. > Embedding the SVG with a HTML embed as <object type="image/svg+xml" data="some.svg"></object> did the trick. * [Svg image element not displaying in Safari](https://stackoverflow.com/questions/27245673/svg-image-element-not-displaying-in-safari/27249490#27249490) - should not affect .png which also do not always load - .svgs already have a `viewBox` and `width` & `height` - .svgs already have a `content-type: content-typeimage/svg+xml`, which is correct
Poster
Collaborator

Fixed by changing Nginx settings

Fixed by changing Nginx settings
nevfy closed this issue 2024-04-17 16:31:45 +03:00
Sign in to join this conversation.
No Label
Docs
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SelfPrivacy/selfprivacy.org#116
There is no content yet.