css - Does setting the real HTML height and width of an image decrease load time? -
css - Does setting the real HTML height and width of an image decrease load time? -
i have website , want improve it's performance. i've fixed mutual issues have 2 questions:
1) let's have 100x100px image , want show it. <img src=" test.jpg" height=100" width="100" alt="">
load slower <img src=" test.jpg" alt="">
?
2) let's domain www.test.com. http absolute paths on same domain load slower relative paths ? <img src=" http://www.test.com/test.jpg" alt="">
slower <img src=" test.jpg" alt="">
?
thank !
in both of these cases, reply depends on browser implementations. these speculations:
let's have 100x100px image , want show it. 'img src=" test.jpg" height=100" width="100" alt=""' load slower 'img src=" test.jpg" alt=""' ?
the load time shouldn't alter significantly. there may processing time since image scaling logic triggered, there less time in recomputing layout, since 1 time image loads, won't impact how much space occupies.
let's domain www.test.com. http absolute paths on same domain load slower relative paths ? 'img src=" http://www.test.com/test.jpg" alt=""' slower 'img src=" test.jpg" alt=""' ?
the relative url may slower in case domain name has requeried, in cases, requests pipelined, shouldn't see real differences.
html css http jpeg
Comments
Post a Comment