I’ve just set up a simple PHP/MySQL website on a new server and I’ve been testing the page load time using a command line tool called
For some reason the load time consistently alternates between 80ms and 150ms.
If I reload the page quickly it usually sticks around 80ms, but if I leave it a few seconds it usually starts out again at 150ms. What would be causing this?
When I test on my local server I get consistent load times of 5ms, and I never get any delays that would account for the 70ms difference on the server, so I don’t think it’s to do with any variations in the way the code builds the page.
I feel like I’m missing something obvious. Is there any reason why my page load time would sometimes be double when I’m requesting from the server, especially after waiting for just a few seconds?
It’s like it’s making an extra round-trip to the server, but I’m not sure why.