javascript - Intermittent failure to load images - ERR_CONTENT_LENGTH_MISMATCH -
the problem
my website fails load random images @ random times. intermittent failure load image following error in console:
"get example.com/image.jpg net::err_content_length_mismatch"
image either doesn't load @ , gives broken image icon alt tag, or loads halfway , rest corrupted (e.g. colors screwed or half image greyed out).
setup
litespeed server, php/mysql website, html, css, javascript, , jquery.
important notes
- problem occurs on major web browsers - intermittently , various images.
- i forcing utf-8 encoding , https on pages via htaccess.
- hosting provider states permissions set correctly.
- in access log, when image fails load, gives '200 ok' response image , lists bytes transferred '0' (zero).
- it images fail load maybe 5% of time css file or javascript file.
- problem occurred after moving servers apache litespeed , has been persistent on several weeks.
- gzip , caching enabled.
this error definite mismatch between data advertised in http headers , data transferred on wire.
it come following:
- server : if server has bug modules changes content don't update content-length in header or doesn't work properly.
- proxy : proxy between , server modifying request , not update content-length header.
this happens if setting wrong content-type.
as far know, haven't see problem in iis/apache/tomcat custom written code. (writing image on response stream)
it caused ad blocker.
try disable or adding exception domain images come from.
Comments
Post a Comment