Use client cache for resource files (css/js/images) without hassle
The problem comes of course when these files changes. If the current VPP folder have set
the web browser will not get these new files before they force a cache reset. One way around this “problem” is to not cache it on the client. But that have some downsides.
My solution is to create my own VPP file system based on the VirtualPathNativeProvider.
The whole concept is that I remove a part of the path that contains Changed_ like this
Regex filter = newRegex("/Changed_[^/]*/");
string FilterCacheKeyPath(string virtualPath)
virtualPath = filter.Replace(virtualPath, "/");
Then I replace all the methods to use the striped version of the path/filename