HTML5 APIs: Measure Performance with User and Navigation Timing

Complex web applications can slow down the processing power of the client. Hence, it is important – especially for mobile devices – to make some adjustments, so everything runs smoothly. Loading performance can be tested quickly and accurately with the new User Timing API for JavaScript, as the timing data bases on the High-Resolution Time API, which measures timing to the microsecond. The Navigation Timing API determines the loading performance of a website with the help of predefined marks. Thanks to the precise measuring methods, developer’s can find out which part of the application wastes time and optimize it. Measure Precisely with User Timing API The User Timing API measures performance between several predefined marks within a web application. You only have to define a start and end mark for the measurement that can be set at any place of the script. The JavaScript object “performance” offers various methods to do that. var measuring_start = performance.now(); With the “now(0)” method, you can start measurement at any place of the web application, for example, within a script that runs a computationally intensive function. In contrast to the “Date(0)” object, which provides system timing as a time stamp, the User Timing API […]