I use querystrings to save page data for objects inside of the page. You can see it in action here (if you click inside of some of the story objects, you'll see the querystring change).
But as I understand it, in general different querystrings on a webpage will result in the webpage being reloaded. I don't want that, because the querystring is just being used to save object data- it doesn't effect anything else on the webpage. All that happens is I change an object property in JavaScript based on my querystring; none of the files actually change.
Is there a way around the cache-breaking? Is there a way I can use querystrings in my webpage url and still use the cache? (so example.com?var=val
will fetch example.com
?)
I'm also open to messing around with using hashes instead, if that would be necessary.
Thanks!
Edit: this isn't a duplicate of this question, I'm not interested in modifying the URL while the user's on a webpage. I'm interested in not reloading a webpage's files when a new querystring is used.
So if a user visited example.com
and then returns to example.com?page=40
, I'd like to reload the relevant HTML page that was saved with example.com
.
I did just realize that I had had a brain fart through; only the core page would be reloaded, I don't have to worry about all the connected scripts and stylesheets like I had been. So this wouldn't likely be that big of a deal. Still, I'm interested in if there are any answers or ideas.