We have one caching issues on live site. Actually we keep JS/CSS files in sitecore media library so after every prod deployment when we publish updates JS file we have to press Ctrl+F5 to load latest JS file updates. This is fine for Developers but not for visitors and we can't instruct every visitors to press Ctrl+F5.
To mitigate this issue we are planning to add time-stamp as a query string in src attribute in
<script> element as described in below URL
and this looks like need modification in sitecore media pipelines. Any idea how can we do this.
Any other suggestion much appreciated
Below Patch works for me
<mediaProvider> <patch:attribute name="type">MyProject.Pipelines.CacheBustingMediaProvider, MyProject</patch:attribute> </mediaProvider>
I see very strange behavior see screenshot. While debugging I found code between line no. 16 and 34 is not getting executed. You can see when I tried to set debug at line no. 14 it throw exception. finally debug point come to line no. 12 and then directly goes to line no. 36 and goes out. Any idea on this.