Expiry header in Laravel for performance | Cache your API response on client to save API call

Опубликовано: 27 Сентябрь 2024
на канале: Amitav Roy
1,748
37

In this performance optimisation video on Laravel, I am going to show you how we can save a round trip to the server for an API call by using the Expires header. The idea is, that if there are URLs where data is not changing frequently, then we should use the Expiry headers to let the client (browser know) about the expiry time. So, the browser will not make any API call till the response time expires or it becomes stale.