0

I have an web app that is based on razor where I am setting a few cookies when they first load the screen based on a guid passed in.

So, the url would look something like:

https://url/CustPortal/Account/Logon/DDE4BBFB-0D2E-4706-A604-36EEA3FDCAE3

Once I validate the guid, I am setting the cookies such as the css from the database.

This part works fine. The problem I'm having is if the guid passed in is different the next time they visit.

The cookies are being set, but it's not using the right css. I can CTRL+F5 and that fixes it but I cannot rely on the customer to know this.

Is there a way to force it to refresh on each visit to the site and not use the cache?

Hope this makes sense!

Thanks!

jsotola
  • 2,238
  • 1
  • 10
  • 22
ErocM
  • 4,505
  • 24
  • 94
  • 161
  • Can you clear the old cookies before saving them again? See http://stackoverflow.com/a/5122611/1967405 – Jras Mar 09 '13 at 18:38
  • I think I understand what is going on there and I think you could improve the logic of loading the CSS in relation to the GUID. First of all you should split the relaying logic of the GUID checking (some kind of security) and CSS referencing. And after all can you be please more specific of your problem? Even maybe some code? – Peter Stegnar Mar 09 '13 at 19:18
  • Does this answer your question? [How to prevent CSS caching on a web page?](https://stackoverflow.com/questions/12992717/how-to-prevent-css-caching-on-a-web-page) – Jesse Aug 29 '22 at 22:35
  • From 9 years ago? I have no idea... – ErocM Aug 30 '22 at 15:08

0 Answers0