Need to calculate page load time

0
Hi All, There is a requirement in our application where need to calculate the total time taken for loading a page. We need this for all pages in our application. Like whenever a page loads its time taken should be calculated. There is javascript code which calculated the time, but the question is where should we place that code so that it calculates the loading time for all pages whenever a particular page get opened. Please help me out, its urgent
asked
2 answers
1

Hello Trishla T,

 

Maybe you can make use of the html javascript snippet:

https://docs.mendix.com/appstore/widgets/html-javascript-snippet/

 

You can add this widget maybe to your pagelayout so you do not have to add it separately to every page. 

You also need to test if this fulfills your demand because maybe the script is not directly activated when loading the page.

 

Hope this helps,

 

Good luck!

 

answered
1

Hi Trishla,

Page load times depend highly on the client. Measuring it from javascript sounds tricky to me because the javascript itself is also part of the load time.

Using a tool like robotframework would be my first choice.

Or if the number of pages is low, it might even be doable using the developer tools of the browser. The network tab gives good measurements of network activity at least.

I hope this gives you some extra options.

Michiel

answered