Docs
Guides
Tips

Tips and tricks

You can simulate an artificial delay in API calls to see how your site works in low bandwidth networks.

next.config.js
module.exports = {
  // ...
  // other configs
  // ...
  serverRuntimeConfig: {
    API_DELAY: 2000, // delay in milliseconds
  }
}

Now the pages that aren’t server rendered, for example, client navigated pages, cart API calls, search etc responses will be delayed according to the setting.

This only works in development.