Some issues I see: .css$ etc will also match "xcss"
and you should say switch -regexp -- $url since urls
starting with "-" will break the filter. It ignores whether the headers have been set already which means if you have a .vuh handler or dynamically generated images etc which might do something like vuhhandler/21987/foo.css you won't have any way to disable it.