fredmiranda.com
Login

Moderated by: Fred Miranda
  New fredmiranda.com Mobile Site
  New Feature: SMS Notification alert
  New Feature: Buy & Sell Watchlist
  

FM Forums | Forum & Miscellaneous | Join Upload & Sell

  

Archive 2008 · No more jumpy image pages!

  
 
brainiac
Offline
[X]
p.1 #1 · No more jumpy image pages!


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.



Jan 14, 2008 at 12:50 AM
StevenPA
Offline
• • • •
Upload & Sell: Off
p.1 #2 · No more jumpy image pages!


Much needed and much appreciated. Your continued hard work keeps improving the FM experience.


Jan 14, 2008 at 09:34 AM
Fred Miranda
Offline
Admin
Upload & Sell: On
p.1 #3 · No more jumpy image pages!


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?



Jan 14, 2008 at 01:21 PM
brainiac
Offline
[X]
p.1 #4 · No more jumpy image pages!


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.



Jan 15, 2008 at 02:09 PM
Duncan Staples
Offline
• • • • •
Upload & Sell: Off
p.1 #5 · No more jumpy image pages!


Cool code - Brainiac.


Jan 15, 2008 at 03:27 PM
donnie16
Offline
• • •
Upload & Sell: Off
p.1 #6 · No more jumpy image pages!


cool I just wrote my first AJAX app and this sounds like a very interesting use. Nice going


Jan 15, 2008 at 10:47 PM
Jazno
Offline
• • • •
Upload & Sell: Off
p.1 #7 · No more jumpy image pages!


Excellent!!!
Your work is becoming more and more appreciated every day!

Jason



Jan 16, 2008 at 12:21 AM





FM Forums | Forum & Miscellaneous | Join Upload & Sell

    
 

Welcome back
Log in to your account