HTTP Caching

HTTP Caching

Besides server-side caching that we have described in the previous sections, Web applications may also exploit client-side caching to save the time for generating and transmitting the same page content.

To use client-side caching, you may configure yii\filters\HttpCache as a filter for controller actions whose rendering result may be cached on the client-side. HttpCache only works for GET and HEAD requests. It can handle three kinds of cache-related HTTP headers for these requests:

<