Reader small image

You're reading from  Full Stack Web Development with Remix

Product typeBook
Published inNov 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781801075299
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Andre Landgraf
Andre Landgraf
author image
Andre Landgraf

Andre is a full stack developer from Germany. He graduated with an MS in Information Systems from the Technical University of Munich and was also awarded an MS in Computer Science from Sofia University in Palo Alto. Andre currently lives in Cupertino, California, and he works as a Software Engineer at LinkedIn. Andre loves learning, writing, and speaking about all things web. In his free time, he tutors aspiring developers and builds for the web.
Read more about Andre Landgraf

Right arrow

Summary

In this chapter, you learned about different caching strategies and how to implement them with Remix.

Remix’s headers route module API export lets us specify HTTP headers for the HTML document on a per-route level. We also have access to loaderHeaders and parentHeaders, which allows us to merge HTTP headers and specify headers based on the loader data.

You also learned how to cache both document and data requests in Remix. You learned how to use the Cache-Control header to specify and prevent caching.

Then, you applied the private, public, max-age, no-cache, and immutable directives. Additionally, you reviewed how Remix implements HTTP caching for static assets out of the box.

Next, you learned about the privacy concerns of caching user-specific data and how to use ETags to avoid downloading full responses while sending requests to the server where the user authorization can be checked.

Finally, we discussed in-memory caching and using services such as...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Full Stack Web Development with Remix
Published in: Nov 2023Publisher: PacktISBN-13: 9781801075299

Author (1)

author image
Andre Landgraf

Andre is a full stack developer from Germany. He graduated with an MS in Information Systems from the Technical University of Munich and was also awarded an MS in Computer Science from Sofia University in Palo Alto. Andre currently lives in Cupertino, California, and he works as a Software Engineer at LinkedIn. Andre loves learning, writing, and speaking about all things web. In his free time, he tutors aspiring developers and builds for the web.
Read more about Andre Landgraf