Last post Jan 18, 2018 05:57 PM by tridip1974
Jan 18, 2018 02:40 PM|tridip1974|LINK
whenever we click on ajax action then how could i insert required things into browser history so when user click on back button then user can navigate. looking for guide line. thanks
Jan 18, 2018 03:49 PM|bruce (sqlwork.com)|LINK
with modern browsers you use the history api. your code will push state to add to the history, and add a listener to the pop state, to update the UI when back is passed. just google browser history api.
if you need to support older browsers, the most common approach was using hash routing (#hashtag) to record navigation. your code navigates to a #hashtag (usually not defined on the page). a background timer runs checking window.location for a change in
the hashtag, and fires an event to update the page.
there are several ajax navigation or routing libraries that wrap the above code. angular / vue have one built in, react, backbone there are several to pick from. there are also several standalone routers. here is a simple implementation:
Jan 18, 2018 05:57 PM|tridip1974|LINK