i am trying to cache a few pages with reverse proxy (using etags) and
though the content across these pages remain the same for all users,
there are some areas (like a div showing the user’s image username,
profile link in navbar) that are user specific.
What’s the best way to be able to cache these kind of pages using
reverse proxies but not still be able to differentiate the user
specific portions? What do the facebooks of the world do?
otherwise static page. Cache the bulk of the page, including all the
elements. It’s still multiple requests, but the size differential
between cached and un-cached content is very large. Plus the outer
page loads immediately, then updates to include the custom stuff.
Set the session to carry the user’s id, then ask the session who
requested this XHR before returning the custom results and using
a Railscast about this very solution.