2020-01-23
2322
Michal Zalecki
12707
Jan 23, 2020 ⋅ 8 min read

Caching headers: A practical guide for frontend developers

Michal Zalecki Senior Engineer at @Tooploox 💎, smart contracts, fan of hackathons, React Wrocław meetup organizer.

Recent posts:

TypeScript logo over a pink and white background.

Drizzle vs. Prisma: Which ORM is best for your project?

Compare Prisma and Drizzle ORMs to learn their differences, strengths, and weaknesses for data access and migrations.

Temitope Oyedele
Nov 21, 2024 ⋅ 10 min read
Practical Implementation Of The Rule Of Least Power For Developers

Practical implementation of the Rule of Least Power for developers

It’s easy for devs to default to JavaScript to fix every problem. Let’s use the RoLP to find simpler alternatives with HTML and CSS.

Timonwa Akintokun
Nov 21, 2024 ⋅ 8 min read
Rust logo over black marble background.

Handling memory leaks in Rust

Learn how to manage memory leaks in Rust, avoid unsafe behavior, and use tools like weak references to ensure efficient programs.

Ukeje Goodness
Nov 20, 2024 ⋅ 4 min read
Robot pretending to be a person.

Using curl-impersonate in Node.js to avoid blocks

Bypass anti-bot measures in Node.js with curl-impersonate. Learn how it mimics browsers to overcome bot detection for web scraping.

Antonello Zanini
Nov 20, 2024 ⋅ 13 min read
View all posts

3 Replies to "Caching headers: A practical guide for frontend developers"

  1. This is amazing and so valuable. Been looking for something like this to properly setup my headers. Thanks for the write up.

  2. Hi Team,

    I have added below code for caching but it’s not working, please suggest.

    location ~* \.(jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|svg|woff|woff2|ttf)\$ {
    etag on;
    if_modified_since exact;
    expires 30d;
    #add_header Pragma “public”;
    add_header Cache-Control “public, no-transform”;
    }

    Regards,
    Mel

  3. For SPA html – is it enough to use meta tag headers to tell the browser not to cache? Are they reliable? Or I must setup response headers on the server?

Leave a Reply