I am very excited to announce that the image size learning code is now in operation. What this means is that if you are the second person to click the 'end' link on a page which shows images, the browser knows the sizes of the images as soon as the page loads. The page will no longer jump downwards all the time as new images load, either from elsewhere on the web, or here on fm. It won't be perfect, but it will go 99% of the way towards solving a very irritating problem.
The database is quietly learning the dimensions of any image that gets posted here, even when it's hosted elsewhere. That allows your browser to draw image boxes at the right size before your computer requests the image data from the other servers. The bottom of the page should stop moving downwards off your screen much earlier. It makes reading comments more enjoyable and allows you to get through the reading more quickly.
ah ha!
That is great! I tested it in a few threads and it worked in some but not in others. Does that mean that for existing threads it won't work the first time and then it will start working after that?
Fred Miranda wrote:
ah ha!
That is great! I tested it in a few threads and it worked in some but not in others. Does that mean that for existing threads it won't work the first time and then it will start working after that?
That's right. If an image isn't known to the database, it won't be served with size attributes, but it will now be served with an onload which reports the displayed size, in the background using ajax, to the new database table called webimgsizes. Next time the parser should pick up the width and height attributes from the db and serve the image with the right dimensions, so no more jumpy pages for the great majority of page hits.