zoropoteame
asked on
How to disable the cache in Internet Explorer 7?
Hi
We are using a dinamic YUI tree view for reflect a folder structure.
We are trying to delete nodes from the tree, but when the browser executes the following code:
oTreeView.removeNode(oCurr entTextNod e);
oTreeView.draw();
the node is not removed from the tree. Seems to be a client side cache problem on IE 7 (Firefox works fine).
We are trying to use cache control on our asp and html codes:
Into the ASP
<%
Response.CacheControl = "no-cache, must-revalidate";
Response.AddHeader("Pragma ", "no-cache");
Response.Expires = -1;
%>
into the HTML page
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
but the issue persists
Below you will find the complete function that we are using for remove the node:
function DeleteNode(oTreeView , idNode) {
var callbackDelete = {
success : function(o) {
//content.innerHTML = o.responseText;
eval(o.responseText);
if(isSuccessfulBL) {
if(previusNode.labelElId == oCurrentTextNode.labelElId ) {
previusNode = null;
}
delete oTextNodeMap[oCurrentTextN ode.labelE lId];
oTreeView.removeNode(oCurr entTextNod e);
oTreeView.draw();
window.location = 'repository.asp';
} else {
getScreenResponse().innerH TML = messageBL;
getScreenResponse().style. visibility = "visible";
}
//getScreenResponse().inne rHTML = o.responseText;
//getScreenResponse().styl e.visibili ty = "visible";
//delete oTextNodeMap[oCurrentTextN ode.labelE lId];
//oTreeView.removeNode(oCu rrentTextN ode);
//oTreeView.draw();
},
failure : function(o) {
//content.innerHTML = o.responseText;
getScreenResponse().innerH TML = o.responseText;
getScreenResponse().visibi lity = "visible";
getScreenResponse().innerH TML = "CONNECTION FAILED! " + o.responseText;
}
} // End CallBackDelete
// Connect to our data source and load the data
var url = "../../BussinessLayer/fold er_BL.asp? " +
"<%=PARAM_ACTION%>" + "=" + "<%=DELETE_FOLDER%>" + "&" +
"<%=PARAM_FOLDER_ID%>" + "=" + idFolder + "&" +
"<%=USER_ID%>" + "=" + <%= userId %> + "&" +
"<%=PARAM_BOOL_DELETE%>" + "=" + "true";
var conn = YAHOO.util.Connect.asyncRe quest("GET ", url, callbackDelete);
} // END DeleteNode()\
How to disable the cache in Internet Explorer 7?
Thanks
We are using a dinamic YUI tree view for reflect a folder structure.
We are trying to delete nodes from the tree, but when the browser executes the following code:
oTreeView.removeNode(oCurr
oTreeView.draw();
the node is not removed from the tree. Seems to be a client side cache problem on IE 7 (Firefox works fine).
We are trying to use cache control on our asp and html codes:
Into the ASP
<%
Response.CacheControl = "no-cache, must-revalidate";
Response.AddHeader("Pragma
Response.Expires = -1;
%>
into the HTML page
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META HTTP-EQUIV="CACHE-CONTROL"
but the issue persists
Below you will find the complete function that we are using for remove the node:
function DeleteNode(oTreeView , idNode) {
var callbackDelete = {
success : function(o) {
//content.innerHTML = o.responseText;
eval(o.responseText);
if(isSuccessfulBL) {
if(previusNode.labelElId == oCurrentTextNode.labelElId
previusNode = null;
}
delete oTextNodeMap[oCurrentTextN
oTreeView.removeNode(oCurr
oTreeView.draw();
window.location = 'repository.asp';
} else {
getScreenResponse().innerH
getScreenResponse().style.
}
//getScreenResponse().inne
//getScreenResponse().styl
//delete oTextNodeMap[oCurrentTextN
//oTreeView.removeNode(oCu
//oTreeView.draw();
},
failure : function(o) {
//content.innerHTML = o.responseText;
getScreenResponse().innerH
getScreenResponse().visibi
getScreenResponse().innerH
}
} // End CallBackDelete
// Connect to our data source and load the data
var url = "../../BussinessLayer/fold
"<%=PARAM_ACTION%>" + "=" + "<%=DELETE_FOLDER%>" + "&" +
"<%=PARAM_FOLDER_ID%>" + "=" + idFolder + "&" +
"<%=USER_ID%>" + "=" + <%= userId %> + "&" +
"<%=PARAM_BOOL_DELETE%>" + "=" + "true";
var conn = YAHOO.util.Connect.asyncRe
} // END DeleteNode()\
How to disable the cache in Internet Explorer 7?
Thanks
what you have is right, can you clear cache manulally one time and see it is caching?
ASKER
I delete a folder in the page, I went to other page and back again and IE no refresh it,
then, I repeated the same process but clearing cache manulally and i can see the change.
definitely is a client side cache issue
then, I repeated the same process but clearing cache manulally and i can see the change.
definitely is a client side cache issue
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think you need to do:
oTreeView.removeNode(oCurr entTextNod e);
oTreeView.render();
oTreeView.draw();
You forgot to render before the draw.
oTreeView.removeNode(oCurr
oTreeView.render();
oTreeView.draw();
You forgot to render before the draw.