Today I Learned

hashrocket A Hashrocket project

The microseconds since navigation started

Date.now will give you milliseconds since the epoch, but maybe what you really want is the time since the page started loading.

> performance.now()
162374.73599999974

Essentially that is the microseconds since the page started loading, but really its the microseconds since performance.timing.navigationStart which itself is defined as the:

time immediately after the user agent finishes prompting to unload 

which is defined here.

See More #javascript TILs
Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS. Contact us and find out how we can help you.