mwrock / RequestReduce

Instantly makes your .net website faster by reducing the number and size of requests with almost no effort.
www.requestreduce.org
Apache License 2.0
228 stars 48 forks source link

/RRContent Folder Exclusion #216

Closed jeffpignataro closed 12 years ago

jeffpignataro commented 12 years ago

Perhaps I missed something, but I'd really like the ability to include the spriteVirtualPath folder in my project so that it could fall under my source control and be part of the build process. Currently, if I add the spriteVirtualPath to the project then every time I build it duplicates all the files in that folder.

I think their are two relatively simple possible solutions: 1) automatically ignore the directory specified in the web.config (spriteVirtualPath) and never compile files that are already in that directory 2) have an option like 'FoldersToIgnore' which is a comma separated list of folders whose content is ignored and not compiled. (Similar to the 'javascriptUrlsToIgnore' but for local folders in the project).

I say these are simple because they SEEM simple. I apologize if either of those suggestions is actually a massive overhaul of the code.

jeffpignataro commented 12 years ago

Discovered the option in the API. Figured it must have been in there someplace, thanks!

RequestReduce.Api.Registry.AddFilter(new PageFilter(x => x.HttpRequest.RawUrl.ToLower().Contains("rrcontent")));