ajaxcross-browserpageloadreadystate

How does readyState work?


I check the property .readyState of BrowserTestObject using RFT (Rational Functional Tester).

Sometimes before the next step in my test script I need to be sure that the page is 'ready' and all objects are loaded.

Does the .readyState == 4 mean that all objects within the browser are loaded and ready? Could any ajax call in background be still "working" or it must finish before the browser returns .readyState=4? What about a flex application?

Is that behavior browser independent or not really? I am after IE 8 (and firefox 3.6.x)


Solution

  • quick answer is YES if browser implementation is correct.

    See here: http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#current-document-readiness