Forum Discussion

chinnar515's avatar
chinnar515
Copper Contributor
Jan 11, 2024

aspx page to force browser to use latest css only when there is a change in css

I am working on a aspx web page for a banking site with quite lot of css styling involved. The same webpage appears across four different brands except for colours and few font differences.
On this web page, there is a breadcrumb with different colour for each brand. This breadcrumb is a <ul> tag of 6 <li> tags. In terms of css files, there is one shared layout and a brand specific file.

 

If the user has that webpage cached earlier, the browser on loading the page is not loading the breadcrumb with colours horizontally. In stead it is loading without colours vertically as bullet points.

 

Of course on forced refresh through ctrl F5 it works. But when I deploy I cannot communicate to millions of users to do that. I cannot use versioning, query string, modification time or hash into the filename as the files keep increasing for every deployment

 

How to force the browsers to reload the aspx page with new css styles while viewing the cached pages? How to force browser cache to use the latest css file? once the latest css files are applied, It should not need to make server calls for future requests if there are no changes in css rather should load from cache

No RepliesBe the first to reply

Resources