On my website, some content is loaded through AJAX as the user scrolls down. When the user goes to another page and comes back through the back button, the previously AJAX loaded content is not preserved in Chrome. I would like to preserve it without making petitions to the server.
For example, in Mozilla and Edge it works perfectly, when you go back, they show you the latest DOM available (not original one). In Chrome, the behaviour is inconsistent. Sometimes it preserves all the content, but the vast majority of times, it only preservers the first AJAX loaded content.
I have configured the cache-control (HTTP header) as 'private, no-cache'.
I have been reading some workarounds using localStorage but I don't like this way. I just want to extrapolate the behaviour that I have in Mozilla/Edge to Google Chrome. Is there any way to tell Chrome to do that? Some websites have this behaviour in Chrome (JustWatch, for example). What am I missing?