• Stars
    star
    101
  • Rank 338,166 (Top 7 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 5 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cache Busting a React App

As great as caching is β€” cache invalidation has been a struggle for a long time now.

There are different approaches that work for different types of websites. I recently had to invalidate the cache of a web app every time a new version has been released. After trying out a few approaches, I settled with an approach that has proven to work every single time.

Concept

  • We want the site to load from the cache if there is no new version
  • We want to refresh the cache every time a new version of the app is deployed
  • We use npm package versioning to version our app and each deploy will be versioned incrementally
  • We generate a meta.json file along with every build in the public dir and it will act as a REST endpoint (won't be cached in browser)
  • We refresh cache (window.location.reload(true)) in the browser whenever a new version is released

License

Copyright (c) 2019 Dineshkumar Pandiyan

More Repositories

1

dev-landing-page

Minimal landing page for developers
HTML
1,220
star
2

react-redux-boilerplate

A minimal React-Redux boilerplate with all the best practices
JavaScript
780
star
3

react-socks

πŸŽ‰ React library to render components only on specific viewports πŸ”₯
JavaScript
426
star
4

npm-module-boilerplate

Boilerplate for npm modules with ES6 features and all the best practices
JavaScript
387
star
5

blogster

A collection of beautiful, accessible and performant Astro blog templates.
Astro
310
star
6

typy

Minimal JavaScript type checking library
JavaScript
227
star
7

browser-or-node

Check where your code is running. In the browser or in node.js environment.
JavaScript
195
star
8

react-render-in-browser

React library to render browser specific content
JavaScript
159
star
9

tweet-fancy

πŸš€ Tweet with bold, italics and strikethough text
CSS
42
star
10

design-system-boilerplate

A design system boilerplate monorepo with opinionated principles, theming and token setup to build your own design system.
TypeScript
40
star
11

gatsby-boilerplate

CSS
31
star
12

progressive-rendering-react

Example setup to progressively render a React app from the server
JavaScript
30
star
13

progressive-rendering

Demo β€” Stream portions of a webpage as chunks from the server
HTML
27
star
14

testing-hooks

Code examples to test custom React hooks with Enzyme
JavaScript
24
star
15

react-npm-package-boilerplate

Boilerplate code for building a React NPM library
JavaScript
24
star
16

code-cheatsheet

Quick reference code snippets curated from various sources
TypeScript
19
star
17

axios-retry-interceptor

Configurable Axios Interceptor to retry failed http calls.
JavaScript
18
star
18

keystone-static-blog

Starter template to statically generate blog websites with Next.js and Keystone
TypeScript
14
star
19

apollo-graphql-playbook

Notes and guides on using apollo client's APIs
12
star
20

portfolio

JavaScript
9
star
21

react-monorepo

Monorepo starter template to build React applications
TypeScript
9
star
22

babel-plugin-render-logger

βš™οΈ Babel plugin that automatically adds a console statement to React components and makes debugging easier
JavaScript
7
star
23

all-my-writeups

Curation of all my writeups πŸŽ‰
6
star
24

fahid-jokes

https://fahidjokes.netlify.com πŸ˜‚
JavaScript
5
star
25

git-handbook

Handbook on how to use git commands and strategies that make life easier
4
star
26

keystone-in-next

Moved to https://github.com/keystonejs/keystone/tree/main/examples/nextjs-keystone
TypeScript
3
star
27

happy-birthday-bhat

Bhat turns 25 - http://happybirthdaybhat.dkbox.in ⚑️
CSS
3
star
28

dineshpandiyan.com

Astro
3
star
29

keystone-docker

TypeScript
3
star
30

next-batch

A promise batching utility mostly used in GraphQL resolvers to avoid N + 1 data fetching
TypeScript
2
star
31

awesome-saas-stack

A curation of SaaS tools to build modern web applications.
2
star
32

node-express-boilerplate

JavaScript
2
star
33

cloudflare-pothos-boilerplate

Boilerplate to get started with Pothos in Cloudflare workers
TypeScript
2
star
34

keystone-template

Starter template to kickstart a Keystone project
TypeScript
1
star
35

next-multi-zone

1
star
36

v1.dineshpandiyan.com

v1 of dineshpandiyan.com
CSS
1
star
37

index

πŸ‘‹ Repos grouped together for quicker navigation.
1
star
38

outstatic-example

CSS
1
star
39

del-key

Delete keys from deeply nested objects in JavaScript
JavaScript
1
star
40

scrabble-game

Command line based scrabble game with in-built dictionary and alphabet scores
Java
1
star
41

react-ssr-parcel

This repo is an example setup to server render a React app
JavaScript
1
star
42

hook-diary

πŸš€ Open collection of custom react hooks
JavaScript
1
star
43

parcel-react-starter

Starter template to build React applications. Tailwind + TypeScript.
TypeScript
1
star
44

global-package-version

Library to check any npm module's version from browser console
JavaScript
1
star
45

v2.dineshpandiyan.com

v2 of dineshpandiyan.com
JavaScript
1
star
46

dontannoyme

Chrome Extension to block FB posts based on provided keywords
JavaScript
1
star
47

eventmanagement-front-end

JavaScript
1
star
48

v3.dineshpandiyan.com

v3 of dineshpandiyan.com
HTML
1
star
49

v4.dineshpandiyan.com

v4 of dineshpandiyan.com
HTML
1
star
50

parcel-extract-vendor-bundle

Example repo to extract vendors into a separate bundle using parcel shared bundles concept
TypeScript
1
star
51

yoga-pothos

Template to build a GraphQL API using graphql-yoga and pothos
TypeScript
1
star
52

git-rebase-vs-merge

Example repo to demonstrate how rebase vs merge works
JavaScript
1
star
53

react-devtools-demo

Demo project for React Devtools talk at React Sydney Sep 2019
JavaScript
1
star
54

parcel-react-package

React package template with parcel build setup
JavaScript
1
star
55

next13-edge-cache-bug

TypeScript
1
star
56

spectacle-template-nextjs

A spectable template that doesn't work very well
TypeScript
1
star
57

parcel-react-bare-minimum

Bare minimum parcel react web app boilerplate I use as a template to open issues in Parcel repo. TypeScript + Emotion
HTML
1
star