PROGRESS EVENTS
The Progress Events specification is a W3C Working Draft defining events for client-server communication. These events were first targeted at XHR explicitly but have now also made their way into other similar APIs. There are six progress events:
loadstart
—Fires when the first byte of the response has been received.progress
—Fires repeatedly as a response is being received.error
—Fires when there was an error attempting the request.abort
—Fires when the connection was terminated by callingabort()
.load
—Fires when the response has been fully received.loadend
—Fires when the communication is complete and after firingerror
,abort
, orload
.
Each request begins with the loadstart
event being fired; followed by one or more progress
events; then one of error
, abort
, or load
; finally ending with loadend
.
Most of these events are straightforward, but there are two that have some subtleties to be aware of.
The load Event
When Firefox...