score:2
If your web server can't set those headers, Workbox and Service Worker patterns would be your best bet for client-side caching. Were you also able to review these create-react-app docs?
You could also try using a web server like Nginx to proxy create-react-app, remove its headers, and add your own:
location / {
...
// hide create-react-app response header
proxy_hide_header max-age;
// send your own header to client
add_header max-age 99999;
}
Source: stackoverflow.com
Related Query
- How to change cache polilcy for static assets in React app (created with create-react-app)
- How to use Turborepo for an existing react app created with Create React App in order to make it a monorepo?
- How to change PublicPath for Create React App in Dev Environment
- How do I add WebPack polyfill to React App created with React Create App without ejecting?
- How to use static js generated throught webpack for react app with es6
- How to set headers for a React app created using 'create-react-app'
- How to distribute fonts or other static assets with a React component library built using Webpack?
- How to change default localhost port for React App
- How to read console.log from a mounted component with Enzyme and Jest in Create React App
- how to use .env.qa or .env.staging with create react app
- Create React app with React-Snapshot Pre-Rendering static files
- How to publish React component with static assets to npm?
- how to config create react app with worker-loader
- How to create a widget with react for integration in other react app?
- How to apply react-native-linear-gradient for the entire app background with React Native
- static HTML landing pages with Create React App
- Workaround for cache size limit in Create React App PWA service worker
- How get window values in Tests with Enzyme, Jest + Create React App
- How can I build a React app with Webpack and import an assets folder?
- How to determine the order of css in my create react app build with webpack and customize-cra?
- Create flowtype for React component with static fields
- How to generate bundle.js for existing react app created using `create-react-app CLI`
- How create a react app with a specific version using the npx command?
- How to build React app with Babel for Internet Explorer 11?
- REACT: How to create a reusable custom hook with functions and effects that can change & react to changes in a host component's data
- How to change the publicPath in Create React App
- React SSR(Server Side Rendering) for SEO before login and after login Create React App (CRA). How to do this in one project folder?
- How can I change the URL for a React app that I'm hosting myself and to which I forward a domain?
- how do you deal with localstorage with tests in create react app withour ejecting?
- How to implement React App navigation for VSCode extension with webview
More Query from same tag
- How to dynamically update query parameters to URL string in react and axios
- How to make a for loop to gather every day of a week that is between months?
- "npm: command not found" error when deploying Python application to Heroku
- TypeError: setResult is not a function
- How to setup the url of the backend site on react build for production
- Cannot read property '__reactstandin__key' of undefined gatsby graphql
- Need full rendered text of a given URL in javascript react
- React stale state issue with callback passed to children
- Typescript + React, rendering an array from a stateless functional component
- All child elements inheriting onclick event from parent div on React
- While i am trying to open my react app the CMD showing an npm err! Saying 'npm err! missing script:start' can anyone help me?
- Why is the data I update from a service not reflecting in state?
- How to change ag-grid date filter placeholder format
- Unable to access nested object in React
- Destructuring props dynamically?
- ReactJS - Rending Map Function with Nested Array in Prop
- How can I send FormData with axios patch request?
- UnhandledScheme & cannot read properties of undefined errors using React.JS
- Explanation: Get previous state
- React search bar searching text in Div in a component
- My custom hook is warning: "Invalid hook call. Hooks can only be called inside of the body of a function component
- How to use React Context API with useReducer to follow a similar style to Redux
- Updating a list of objects in a list of objects immutably
- React child component causing a reaction in parent component
- React Dropzone Uploader submitting files on drop instead of when i click submit
- why react router url changes but component does not load in my nested router app
- How can I get row index if every cell is a child component?
- Ionic/React/TypeScript,using react-router history.push, history.replace and history.goBack Animation triggers twice
- toggle active state with hooks react
- React-Semantic-UI Rating onRate() undefined value