dvdzkwsk / react-redux-starter-kit

Get started with React, Redux, and React-Router.
MIT License
10.29k stars 2.2k forks source link

Browser caching and deep URLs #676

Closed egeriis closed 8 years ago

egeriis commented 8 years ago

Hi there!

We're using this awesome starter kit in all our front-end projects at Dixie.io, and are very happy doing so.

To put the following question into context, we're serving our React apps through nginx with Cache-Control: no-cache and ETags. This means that the browser should cache our static files as long as the server responds with 304 Not Modified.

But a caveat we haven't been able to find a solution for, is the ability to have the browser understand that all URLs within a certain "namespace", e.g. /app, will serve the browser with the same markup. So for each URL in our SPA the browser will cache the markup, meaning that caching is not utilized for /app/deep-url if the browser has yet to visit the app on this URL to bootstrap the app.

Does anyone in this community know of a solution with this regard—or are we so much ahead in terms of the power of JavaScript and History manipulation, that browser caching is yet to follow?

Hope to hear your thoughts 🙃

dvdzkwsk commented 8 years ago

Sorry to see that this went neglected for so long. At the time I had nothing to add to help, but left it open hoping somebody else would be able to help you out. It appears as though that's not the case, so I'm going to close this in an effort to clean up some of the inactive issues. Sorry again, good luck with everything.

egeriis commented 8 years ago

@davezuko No worries Dave. My assumption is that there is no resolution for this issue at the moment. I haven't been able to track down any notes on in. Someday, maybe 🎉