AJAX pagination, update current page
When you refresh the page, there is currently no state you can use to know you’re on page 2. You could use the History API to update the page URL without refreshing the page: history.pushState(data, title, ‘https://yourpage.com/?page=2’); You can also set some state on the user browser using the SessionStorage instead of the LocalStorage API, … Read more