www.cow-soap.co.jp - Content randomly not loading
Categories
(Web Compatibility :: Site Reports, defect, P3)
Tracking
(Not tracked)
People
(Reporter: azlata, Unassigned)
References
()
Details
(Keywords: webcompat:needs-contact, webcompat:needs-diagnosis, webcompat:site-report)
User Story
platform:windows,mac,linux,android impact:content-missing configuration:general affects:all branch:release diagnosis-team:networking
Attachments
(1 file)
|
1.39 MB,
video/mp4
|
Details |
Tested on:
• Browser / Version: Firefox Nightly 127.0a1 (2024-05-09) / Firefox Release 125.0.3 / Chrome 124.0.6367.202
• Operating System: Windows 11
Steps to reproduce:
- Navigate to: https://www.cow-soap.co.jp/corporate-info/press-release/2024-City-Bathhouse-Sento-Gallery/
- Observe the page
Expected Behavior:
The content is shown.
Actual Behavior:
The content is not shown.
Notes:
- Reproducible on both Firefox Release and Nightly
- Not reproducible on Chrome.
- Reproducible regardless of settings of Enhanced Tracking Protection
Created from https://github.com/webcompat/web-bugs/issues/136850
| Reporter | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
Comment 2•1 year ago
|
||
The missing content is in <img> tags that have a dynamically added max-width attribute. When the page works a value of 2000px is used, but in the broken case it is 0px. This value is computed by the following function in jquery-addMaxWidth.js:
$.fn.addMaxWidth = function() {
return this.each(function(){
var $this = $(this);
var imgObj = new Image();
imgObj.src = $this.attr('src');
$this.css('maxWidth', imgObj.width+'px');
});
This code has a race condition since the image width isn't updated until the image has actually loaded asynchronously. If I throttle chrome (to "slow 3g") I see similar breakage to Firefox. In normal operation, Firefox seems to queue the network request longer than Chrome (by 1+ seconds) which exposes us to the issue. Reloading the page from caches works fine since the images load quickly enough.
Comment 3•1 year ago
|
||
Assigning the networking team. We know what's happening based on comment 2, but maybe there's something we can change to make us behave like Chrome more reliably.
Comment 4•1 year ago
|
||
So the site is broken; they have a racy implementation. We could ping them, but Japanese, so not likely to get a response. Independently, we can look at performance from changing resource loading order, but not on this bug.
Description
•