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

Generating files over and over #207

Open jsassner opened 12 years ago

jsassner commented 12 years ago

Hi. Using 1.8.73, and i have a problem where for some reason .js / .css / sprites is created every now and then without any changes on the actual underlying files. What is there that can trigger the process so often? Could it be some underlying httphandler of some kind? I'm using the N2 cms and the Yaf forum.

mwrock commented 12 years ago

Any change in the URL of the js or CSS, the order of the js or CSS on the page or if the rr generated file is deleted. If your CMS injects any random tokens into the URL then that would trigger an update.

jsassner commented 12 years ago

I'd say both: I have multiple host headers pointing to the same code base, so different urls. I also have an forum component that injects references to both .css and .js files. I sadly have no power over changing them. Part from the host header, the rest of the url should be the same, i.e. no unique id attached to the url.

Is there anything i can do?

jsassner commented 12 years ago

Hi. I saw you saying in one other Issue note that RRConfiguration.BaseAddress was used by you in a unit test, but i was wondering if i can be a solution to my problem above.

I have multiple sub-domains pointing at the same site (site1.test.com and site2.test.com both point at web at www.test.com), and since the underlying files are access from two different sites i get duplicates of minimized files in the RequestReduceContent directory. I was wondering if RRConfiguration.BaseAddress is the way to go, i.e. setting it to www.test.com in my Global.asax.cs ? Or should i do it some other way? If i can use RRConfiguration.BaseAddress and you said you used it for unit tests, are you gonna leave it in the code in the future?