PortletResponse.getCacheControl().setExpirationTime(100000);
Now the question is what if i want to prevent response from being cached if thats the case you can set preventCache flag to true while making dojo request like this
dojo.xhrGet({
url: " ",
preventCache: true,
load: function(data, ioargs){
dojo.byId("resourceResponse").innerHTML = data;
},
error: function(error,ioargs){
alert(error);
}
});
What the preventCache flag would do is that it will append
dojo.preventCache
query parameter to the url before making request so in my case it will take the <portlet:resourceURL/> and append the dojo.preventCache
query parameter and the value of dojo.preventCache
parameter will change every time the xhr call is made so server will always return the full response.
2 comments:
sending ajax request in dojo
Thanks for info
Web Design Company in Bangalore
Website development in Bangalore
Post a Comment