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.
sending ajax request in dojo
ReplyDeleteThanks for info
ReplyDeleteWeb Design Company in Bangalore
Website development in Bangalore