We have a website that is rendering well on all browsers and devices, except only the first time you open it in Safari mobile ( or Safari Mac on narrow screens ).
Website: http://sheriff.org/
Reproduce on iPhone Safari:
Reproduce on Safari for Mac:
Expected: Page should render the same first and second time
Actual: For the first time in private mode, only a green box is visible The second time, page renders completely
Findings: I tried to compare both pages (when it renders correctly, and when the render is broken), to see if there are any difference, to find out that in both cases, the page has the exact same HTML & CSS.
If you inspect any of the elements that are not shown on the first attempt ( which supposed to render correctly after page refresh), you won't find any style that is affecting the element's visibility (like opacity
, display
, visibility
, position
, ...etc)
UPDATE:
It seems that there's an error in Safari Console Unhandled Promise Rejection: [object DOMError]
that might be causing this issue,
I have done a research and found out that it can be caused by auto-playing video on the page ( the page does have a video, but the video plays even if this error is thrown ), so I believe there should be another reason why this error is thrown
Any advice on why we see such behavior on Safari is highly appreciated.
Your website is rife with problems, and as some other commentators have noted, some of the problems are due to the absurdly large size of the home page causing some of the site assets to not be loaded when you want them to be loaded as some large external scripts are loading prior to your css. The reason the css in question loads on the "second" try, is because the css gets cached...eventually (after loading the one of a few dozen javascripts you request PRIOR to the one of the few dozen css files you request)...and will properly deploy the css on subsequent loads (so long as you do indeed allow enough time and bandwidth to load the page the first time).
I want to give you alot of advice off the bat, but in keeping relevant to your post:
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With