How to check the page load times of pages generated by Mobify-js

65 views Asked by At

I am looking for measuring the time required for loading a page which has been generated by Mobify-js. As mentioned on the website, when the js is used, the page load times is optimizated. So, I wanted to understand, against what benchmarks (original) file can I measure the performance of mobify-js.

One thing that comes to my mind is, simply removing the import of the mobify-js for a sample page like "resizeImages-img-element/index.html" in the source code, and comparing the page load times of with and without mobify-js. Mobify-js community, any thoughts on the same? Any help in this regards will be appreciated.

1

There are 1 answers

1
tedtate On BEST ANSWER

You can get some timing data about the different parts of the Mobify transformation by looking at Mobify.timing.points. Using this you can measure the time difference between when the page begins loading and a collection of different events.

// Measure time between 'finished document' and 'DOMContentLoaded' var loadTime = Mobify.timing.points[11][0] - Mobify.timing.points[0][0]