Commit graph

5 commits

Author SHA1 Message Date
4483df2040 Run Prettier on my TS file
VS Code wasn't running it automatically; now we've got it set up!
2021-02-02 21:40:43 -08:00
d7028bc2cc One more TS fix, adding a tsconfig.json 2021-02-02 19:29:58 -08:00
cb87fd8a9a more TS fixes 2021-02-02 19:22:47 -08:00
cee5e128cb fix TypeScript build errors
That's what I get for forking a TS file, not knowing TS, and ignoring the errors lol :p
2021-02-02 19:20:02 -08:00
d3b9f72e67 Add stale-while-revalidate cache headers
Oh yay, I'm pleased with this! I hope it works out well!

stale-while-revalidate is an HTTP caching feature that gives us the ability to still serve relatively static content like item pages ASAP, while also making sure users generally see updates quickly.

The trick is that we declare a period of time where, you can still serve the data from the cache, but you should _then_ go re-fetch the latest data in the background for next time. This works on end users and on the CDN!

I've scanned the basic wardrobe and homepage stuff and brought them up-to-date, and gave particular attention to the item page, which I hope can be very very snappy now! :3

Note to self: Vercel says we can manually clear out a stale-while-revalidate resource by requesting it with `Pragma: no-cache`. I'm not sure it will listen to us for _fresh_ resources, though, so I'm not sure we can actually use that to flush things out in the way I had been hoping until writing this sentence lol :p
2021-02-02 19:07:48 -08:00