I have implemented an HttpHandler to dynamically adjust CSS (specifically colors) based on a technique I discovered on SO.
Everything is working perfectly, except for the page where users can customize their own colors. When they save their preferences and the page refreshes, the new colors are not displayed immediately. They only appear when I manually reload the browser or press F5.
While I understand that caching by either IIS or the browser is usually beneficial, in this specific instance, I need to find a way to trigger a reload and activate the HttpHandler.
Does anyone know how to achieve this?
Here are some methods I've attempted:
Response.Clear();
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Expires = -1;
Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
Due to my use of ASP.NET themes, adding a querystring to the stylesheet link isn't straightforward.
Any suggestions?