I have seen many questions about this topic in stack overflow but only one code helped me to do it and that code is in Check if Internet Connection Exists with Javascript? As I don't have 50 reputations I couldn't comment under the post by morespace54
<script>
function doConnectFunction() {
// Grab the GOOGLE CMD
}
function doNotConnectFunction() {
// Grab the LOCAL JQ
}
var i = new Image();
i.onload = doConnectFunction;
i.onerror = doNotConnectFunction;
// CHANGE IMAGE URL TO ANY IMAGE YOU KNOW IS LIVE
i.src = 'http://gfx2.hotmail.com/mail/uxp/w4/m4/pr014/h/s7.png?d=' + escape(Date());
// escape(Date()) is necessary to override possibility of image coming from cache
</script>
So my doubt is "Is there any problem in using this link http://gfx2.hotmail.com/mail/uxp/w4/m4/pr014/h/s7.png Do I have to worry about copyright issues If yes then can anyone help me with a link that doesn't have any copyright issues"