I have the following code that is called on every page request
getJSON('/UserStructure.mvc.aspx/Index', null,
function (dto) {
_userDTO = dto;
}, null, true);
It calls JQuery getJSON behind the scenes.
This seems wasteful, is there anyway of caching this result for the lifetime of the users session?
The session is disabled on the server side for various reasons.
The jqXHR return object could be stored as a session cookie on the browser. If you create a cookie in javascript or C# but do not specify an expiration date, I believe the expiration defaults to the end of the current browsing session.