4 ms·
In the article it was examined what some of the tests for page load speed measure as TTFB: The tests measure the time until the arrival of the first character o
by infinity 14y ago
In the article it was examined what some of the tests for page load speed measure as TTFB: The tests measure the time until the arrival of the first character of the HTTP headers.
When using a dynamically generated page it is possible to send the HTTP headers, then maybe send some some content and then do some server side calculations or database access, and finally send the rest of the page content. The TTFB measured by the tests, which were mentioned in the article, will not reflect the time needed for server side calculations.
When using a server side scripting language there may be some kind of output buffering, which has to be deactivated first.
- bad_user 14y agoNot many web frameworks are configured to start writing the response before the response is actually ready. This is because when sending the response you need to know the HTTP status of that response. Is it a redirect? And if you're querying the database lazily, after your page started to render, what about DB errors that could happen? Then you'd need to send an HTTP 500. This is the drawback of using this feature in Rails 3. You have to ensure that there's no way something unpredictable happens. And you have to activate the feature explicitly in your controllers. And after you did that, you're probably going to be aware that TTFB is not that relevant.