var paras="ajaxFlag=getMarkerIDs";
var myAjax= new Ajax.Request(
"AddInfoHandler.ashx",
{method:'get',parameters:paras,onComplete:showGetMarkerIDsResponse}
);
because I have a When switching databases, when entering database A for the first time, the list is loaded correctly. Clicking on the node (ajax) map displays the A data, but clicking IE to go back and then entering the treeview of database B, the list is loaded correctly (the loaded list is not ajax). When I clicked on the node map, the data displayed was still the data of A (ajax). I set a breakpoint in AddInfoHandler.ashx and found that when I performed the above operation again, the breakpoint was hit when entering database A, but the breakpoint was not entered when entering database B, but I It's really strange. Ajax returns data even if the page is not entered, and it is the same as last time. It should be a caching mechanism. Finally, the information found online has changed as follows:
var myAjax=new Ajax.Request(
"AddInfoHandler.ashx",
{method:'get',requestHeaders: ['Cache-Control','no-cache','If-Modified-Since','0'] ,parameters:paras,onComplete:showGetMarkerIDsResponse}
);
For the following, you can refer to previously published articles
http://www.jb51.net/ article/22074.htmIntroduction to response.setHeader parameters and usageDetailed source reference:
http://www.jb51.net/article/16437.htm