mercredi 1 mars 2017

How can I cache assets in a SPA when changing the page from the URL bar?

I'm writing a Single Page App in view, using HTML5 history mode (meaning the URLs look like /foo/bar instead of /#/foo/bar). This way, when navigation occurs, the URL changes, but no network request is actually made.

However, I'm concerned with the case when a user manually changes the URL, say from /foo/bar to /foo/baz. This seems to still trigger a network request to happen, which I think is unavoidable. Are there some best practices I can apply here though that will make the amount of network requests made to be very small?




Aucun commentaire:

Enregistrer un commentaire