onload after image background loads

From MozillaZine Knowledge Base
Jump to navigationJump to search


When a document finishes loading, an onload event is fired. Normally this event is fired before background images finish loading, decreasing the perceived rendering time. However, there are a variety of reasons why someone would need the event fired after background images load (notification when rendering is complete, for one). This preference controlled whether background images load completely before the onload event fires.

This was previously controlled by an environment variable (MOZ_FORCE_PAINT_AFTER_ONLOAD).

Possible values and their effects


After a document and all its background images finish loading, fire the onload event.


Allow the onload event to fire before background images finish loading. (Default)


  • This preference was removed, making the default behavior for onload to fire after background images have loaded. This was done for compatibility with other major browsers.

First checked in

2005-07-15 by Christian Biesinger

Has an effect in

  • Mozilla Firefox (1.5–2.0)
  • Mozilla Thunderbird (1.5–2.0)
  • Camino (1.0–1.5)
  • SeaMonkey (1.0–1.1)

Related bugs