Internet Explorer Download Bar, Page 5.57MB

I have a unique question. There is a web application that takes 5.57mbs of download. I want it to have a download bar or Ajax Spinner that animates, so that they know that during the download time ~ 10-20 seconds there is a forward movement. Most of them are images, there are a lot of JS here. The problem here is that Firefox correctly threads everything so that the animated gif keeps spinning. Animating. The world is happy. However, IE loads the first few frames of the counter, then stuttering stops earlier, and it does nothing until the site is fully loaded. It also blocks the browser upon loading without loading. It will then show the page when the download is complete, however the spinner stops during the first frames, whether it is attached or not.(Cached download is only ~ 2-3 seconds). Again, this does not happen in Firefox, Safari, or modern browsers other than IE. Is there a way to load IE nicely? Research has not yet come up with anything.

Loader code (on request): note that due to the large code base it is difficult to rephrase, however this seems to complicate the problem.

<script type="text/javascript">
    function show_main_gui() {
        dojo.byId("splashloader").style.visibility = "hidden";
    }
    function init(){
     show_main_gui();
    }
    dojo.addOnLoad(init);
</script>
<style type="text/css">
#splashloader {
 position:absolute;
 z-index:999;
 width:800px;
 visibility:visible;
 height:600px;
 background:#fff;
 text-align:center;
 color:#1E4FD9;
}
</style>

<table id="splashloader"><tr><td><img src="images/interface/splashloader.gif"><span class="loader"> Loading...</span></td></tr></table>

Table ... because simplify vertical alignment in all browsers.

IE 8 and 7 are still preserved when loading gif loading animations. If I change the counter that will be displayed after loading, the animation will be animated. I tried to pull all the JavaScript calls except this one and load it into the cache, and it still only shows the first few frames in IE during a load of 1-2 seconds.

+3
source share
3 answers

javascript /. , - , , , / .

<script id="postLoadJavascript" type="text/javascript" ></script>

<script type="text/javascript">
  var imagesLoaded = 0;
  var totalImages = 100;
  for(imagesLoaded = 0; imagesLoaded < totalImages; imagesLoaded++){
    window.status = 'Loading image ' + imagesLoaded + ' of ' totalImages + '...';
    document.write('<img src="image' + imagesLoaded  +'.gif" /> ');
  }
  window.status = 'Loading additional javascript...';
  document.getElementById('postLoadJavascript').src = "theAdditionalJavascript.js"
  window.status = 'Finished loading all.';

</script>
0

iframe. , gmail, "loading..."

+1

gif IE. gif, javascript ... (, )

0

Source: https://habr.com/ru/post/1720424/


All Articles