Home
weapon - client-side internet connectivity check
May 16th, 2008
12:53 pm

[Link]

Previous Entry Add to Memories Tell a Friend Next Entry
client-side internet connectivity check
i know some of you out there have banged your head against this, too. but rejoice! you can just use the javascript "Image" object. you can use its "onerror" and "onload" event handlers to let you know whether or not the image out on the internet was able to be loaded or not. so you just need to pick an Image.src that you can trust to be there, and you have your access check.
it took me months of background-thinking to come up with this of this simple, simple method. ♥

(Leave a comment)

My Website Powered by LiveJournal.com