Cache on HTTPHandlers URLS

Toon_Link_64

New Member
I am building a AJAX based prettyphoto gallery in ASP.NET.What I do is displaying a set of thumbnail, while clicking each thumbnail I post a AJAX request and according to the thumbnail I get some URL's and display the prettyphoto gallery. All set to go nice. But.Let me explain.\[code\]Thumbnail1 Thumbnail2 Thumbnail3Thumbnail4 Thumbnail5 Thumbnail6Thumbnail7 Thumbnail8 Thumbnail9....\[/code\]When we click the Thumbnail1 it post a AJAX request and get some urls like this.\[code\]"../GalleryHandler.ashx?id=0""../GalleryHandler.ashx?id=1""../GalleryHandler.ashx?id=2""../GalleryHandler.ashx?id=3""../GalleryHandler.ashx?id=4"\[/code\]And I do some check in the GallerHandler.ashx according to the thumbnail clicked and the id and give the appropriate image as output from a webservice. The problem is if I clicked the Thumbnail2 and it returns some URL's like this for example\[code\]"../GalleryHandler.ashx?id=0""../GalleryHandler.ashx?id=1""../GalleryHandler.ashx?id=2""../GalleryHandler.ashx?id=3""../GalleryHandler.ashx?id=4""../GalleryHandler.ashx?id=5"\[/code\]So when the prettyPhoto gallery popup and display gallery it displays the old image from id0 to id4 didn't even go to the ashx page to check (I put breakpoint and check) and displays the old image of Thumbnail1, but for id5 it goes to the ashx page and get the new image correctly.I try putting this in "ProcessRequest" after some google.\[code\] context.Response.Clear(); context.Response.Cache.SetCacheability(HttpCacheability.Public); context.Response.Cache.SetExpires(DateTime.MinValue);\[/code\]But it wont solve the issues, But Chrome displays it correctly what I expect other browsers displayed like what I explained.I am new to this httphandler, so guide me even If I am wrong and misconception. Thanks.
 
Back
Top