I have the same problem when I download content via AJAX with Firefox 12.
Both Chrome and IE9 + report offsetWidth correctly after the completion of the ready state, but Firefox does not seem to have calculated it yet.
If you check the bit later (even sometimes delaying half a second), Firefox has the correct width.
I suspect someone was trying to make Firefox faster by issuing a ready-made signal before they would.
The original poster did not give details, but I suspect that this could be a problem.
Edit: PS The only way I found this to work correctly is to defer and continue checking until it has the correct value.
source share