Progressively enhanced pushstate/popstate enabled applicationswith a server-side fallback.
npm install progressive-pushstate- You want the state of a web page to be rendered by both the client and the server side.
- You want the state of a web page to be controlled by the page's query string.
- You want to make sure that make sure your page's state can be shared correctly via email/social media/etc.
- You want all of the above but you don't want to be tied into any specific framework (e.g. React, jQuery, Angular, etc)
- You want all of the above implemented using progressive enhancement to ensure older browser's that don't support the library will still be able to use your application.
Note that library allows the developer to not worry about browser history and back/forward button usage -- as long as s/he has set up the library correctly, everything should just work automatically (more on this later).
- This is not a library that will include a whole bunch of page state visual effects for free. You must know JavaScript and be able to implement these yourself.
- It will not run JavaScript on the server side.
This link currently works like you would expect it to (by going to the server and fetching the relevant page), but now you want to be clever and have this link trigger an AJAX request that will only retrieve the HTML fragment of the page that is different from the original page (i.e. the content of the page without the header and footer).
* First, add the progressive-pushstate script to the bottom of your page.
`