Showing an Image on Remote Server Error

By | May 6, 2008

If you’re hotlinking images from other servers (this is often used when adding banner codes), you might face the situation when remote server becomes unavailable. This will spoil your site look, if you don’t add a simple code, that allows to solve this issue.
<img src="BANNER URL(REMOTE)" onError="this.src='LOCAL URL SHOWN ON REMOTE SERVER ERROR'" height=31 width=88>

This simple code will save you from worrying on remote server uptime. That’s also a nice solution for showing remote server uptime – if you cannot get an image from remote server, the server shoulf be experiencing problems. You this and you’ll forget about banners with X signs.