Thursday, June 23, 2011

Avoid Caching Issues While Development

Browser caching can become a nightmare when developing web applications, as most of the changes what we make in the code may not get reflected at the browser end, which might end up missing the set time frame for that specific task; the reason being caching of contents at the browser level or at the proxy level. 

The problem with browser caching can be sorted out through use of a new feature built-in to modern browsers known "InPrivate Browsing" (in IE) and "Incognito window" (in Chrome). The feature presents you with a session (a new window) which is completely free from all sorts of saved cookie info and content cache. The beauty of this mode is that, what ever browsing you do here wont even leave a trace of those activities in the browser history nor in the cookie container or in the browser cache. 

If you had done Ribbon UI development in SharePoint 2010 before, then definitely you must have faced the dilemma of caching, as what ever changes you made to the Ribbon bar won't get reflected at the browser end as the XML required to render the Ribbon UI is cached. Myself being faced with the dilemma of caching with other development tasks and now in SharePoint, I had decided to go for the aforesaid "Isolated Mode" (as I wish to call it) as its going to eliminate the issues associated with web browser caching.

So next time don't forget to utilize this pretty cool feature packaged with almost all browsers available out there in the net.

No comments: