Home » Javascript » GIF image on a window head not showing the animation in Chrome.(working fine in other browsers)

GIF image on a window head not showing the animation in Chrome.(working fine in other browsers)

Posted by: admin August 19, 2018 Leave a comment

Questions:

I am trying to load a GIF image to describe that the page is loading in a newly opened window which is created by window.open() method.The gif is loading properly in firefox browser whereas its not loading properly in chrome(It means the GIF animation is not playing.It is just showing the image).How to make it animate.Need some help.

here is my code:

  var imgurl = window.location.protocol + window.location.host + 
 "/ProjectName/Images/ProjectName/loadingplswait2.gif";
 var link = document.createElement('link');
 link.type = 'image/gif';
 link.rel = 'shortcut icon';
 link.href = imgurl;

 childScope.document.getElementsByTagName('head')[0].appendChild(link);

Click here to see the image

Answers: