Empty image sources can really kill performance

Ever thought to add to <img src=””> to your site? Probably not.. Since it doesn’t achieve much. However if you’re building a mobile web-app, all of the images take up precious memory on the mobile device.

A possible optimisation technique is to change the image tags so that only the images in current view are actually displayed and when the user scrolls away they can be removed. Not a bad idea, just don’t set the image src tags to “” because certain browsers don’t know how to interpret this properly and instead of displaying no image they will treat the “” as a relative url meaning the browser will make another request to your site to populate the image.

More details here

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s