Interesting

goto() vs fetch() ——————————————————-

If your goal is only to get payload data (JSON/HTML bytes), fetch() is typically faster, because it does not trigger a full page navigation lifecycle.

If you later need to execute page JS for that same payload, use goto_render() with the already fetched response. In that scenario, total time is close to starting with goto(), but you still avoid a duplicate upstream request.

This is because the first navigation request is intercepted and fulfilled from local payload bytes.

_images/goto_vs_direct.svg

Note

In this example, the server response time is static and equals 400 ms.