Javascript Image Reloading; flickers -


i have image, out.jpg, updated more or less every second. want image displayed in html file, , date. original solution reload image every half second. worked fine, image flicker white second while loading.

any solutions?

what tried fix load image separate hidden <img> tag, , load visible <img> tag, , let open cache, eliminating flickering. worked part of time, out.jpg have changed time hidden tag loaded , visible tag loaded it... causing more flickering.

how loading image?

probably preload technique need. can create image in jquery , bind load() event it. when event fires swap img.src of image in html

http://api.jquery.com/load-event/


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -