holidayextras / barometer

Framework agnostic browser performance metrics
MIT License
5 stars 5 forks source link

Ready states in IE are different #17

Closed msaspence closed 7 years ago

msaspence commented 7 years ago

The state names are different in Internet Explorer. Instead of UNSENT, OPENED, HEADERS_RECEIVED, LOADING and DONE, the names READYSTATE_UNINITIALIZED (0), READYSTATE_LOADING (1), READYSTATE_LOADED (2), READYSTATE_INTERACTIVE (3) and READYSTATE_COMPLETE (4) are used.

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState

theninj4 commented 7 years ago

This doesn't actually make a difference - the state names are different, but we look them up based on id and map them to a name for the sake of a readable metric :+1: