update ajax on browsers back & refresh button is trigger
|
Its my first web application building with jsp , jstl using ajax as to make music player play throughout the site. i have many ajax req in single page . when i click on that its works all fine but when ever i refresh it takes me to blank content page in this code "Djpage.jsp" with out any content as requested in ajax i know as for url it will show but i researched a lot and tried but its not working and when i click button it does not respond only url is changed .
Need help and explanation how do i achieve this -
- Show ajax data whenever refresh button is trigger.
- Forward and backward button should work and show the ajax content.
Hope you get My problem
Below is on of my ajax req code -
- $('li.box').on('click', function(){
-
- $(this).children("form").submit();
- var Djform = $(this).children("form");
- var url = 'Djpage.jsp';
- var Djname = $(Djform).children('input[type=hidden][name=inputName]').val();
- $.get(url,{inputName:Djname},function(data){
- $("#cssSlider").hide();
- $("#tabscontainer").hide();
-
- $("#dj_loard").html(data);
- $("#dj_loard").show();
- var newTitle = $(data).filter('title').text();
- document.title = newTitle;
- window.history.pushState("",null, url);
-
-
- });
-
-
-
- });
|