# Preloading xml in firefox

**URL:** <https://forum.kirupa.com/t/preloading-xml-in-firefox/183984>\
**Category:** Uncategorized\
**Created:** [March 31, 2006, 6:42pm UTC](https://forum.kirupa.com/t/preloading-xml-in-firefox/183984 "2006-03-31T18:42:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonni](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tonni](https://forum.kirupa.com/u/tonni)\
**Post date:** [March 31, 2006, 6:42pm UTC](https://forum.kirupa.com/t/preloading-xml-in-firefox/183984/1 "2006-03-31T18:42:14Z")

</div>

Hey guys -

I’ve noticed that preloading for instance the kirupa xml gallery in Firefox  
seems to work differently to IE.  
Example - in IE it starts with the percentage 0 and moves along, but in Firefox  
it shows NaN (not a number) at first and moves along thereafter.  
In the flash IDE it works perfect - just wandering if anyone of U have had experinced similar behaviour - and perhaps - found a cure for it.

Thanx in advance

---

<div class="post-metadata">

**Author:** ![calvintage](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@calvintage](https://forum.kirupa.com/u/calvintage)\
**Post date:** [March 31, 2006, 8:30pm UTC](https://forum.kirupa.com/t/preloading-xml-in-firefox/183984/2 "2006-03-31T20:30:45Z")

</div>

> [@tonni](#):
>
> Example - in IE it starts with the percentage 0 and moves along, but in Firefox  
> it shows NaN (not a number) at first and moves along thereafter.  
> In the flash IDE it works perfect - just wandering if anyone of U have had experinced similar behaviour - and perhaps - found a cure for it.

I’ve been having a similar problem as well. How’d you figure out that FireFox starts preloading from NaN? That’s a great find.

Keeping that in mind…would this work?

```auto

if((xmlData.getBytesLoaded() >= xmlData.getBytesTotal()) && !isNaN(xmlData.getBytesLoaded()))

```

I’m gonna upload the code to my server and see if it works.
