a bit confused !

Apr 24, 2009 at 4:43 AM
Hi,

First of all thanks a lot for such useful project. (It is a different story i am not able to make it work for my website in last three hours.)

I've downloaded the latest source code 'mbcompression-23156'. I've compiled the source in release mode. The readme.txt in the latest source code is not having any instruction about adding c# code but the Readme in last released version has some instructions to write code after web.config changes.

Do we really need the code level changes mentioned in the last released version or the latest read me is final. Only Web.config changes suffice ?

Anyway right now i changed only web.config and not any code. After making changed the entire layout of my page is spoiled.
Any thought why this is happening ? I am using auto mode and did not make changes to default configuration mentioned in the read me file.

Please help since i am on very tight schedule to improve the performance of my web site.

Please let me know if you need any more detail.

Thanks in advance
--Satyen
Apr 24, 2009 at 10:44 AM
I understand your confusion. There are lot of changes since the last release  and the current source code.
It is recommended to download the latest source and follow the instructions in the readme that inside the source project.
No changes are needed in the C# code, and also not in the aspx code.
Apr 25, 2009 at 4:17 AM
Thanks for reply.

I am able to make it work 80%. I had to make changes in original
source file of mbcompressor though.

The only issue left with Css files. It is not compressing the css
file. Even though the compressor is running in auto mode it is looking
for Css.axd file.

I will further investigate.

Thanks
--Satyen Sharma

sent from iPhone
Apr 25, 2009 at 12:11 PM
Did you make it work finally ?
Can you share me with your changes, so I can update the source if needed ?
Apr 25, 2009 at 2:36 PM
It is working if i exclude CSS compression. I wanted to exlude CSS from entire process of compression/minify etc.

I made change to following condition. Just wanted to make sure the compressCSS / compressJavaScript takes precedence over other settings. 

if

 

(settings.AutoMode)
{

//bool processCss = settings.CompressCSS || settings.MinifyContent; (Original condition. Modified condition is in next line)

bool processCss = settings.CompressCSS && settings.MinifyContent;
bool processJs = settings.CompressJavaScript &&  settings.MinifyContent;

app.Response.Filter =
new AutoModeFilterStream(app.Response.Filter,app.Response.ContentEncoding, processJs,processCss);

 

}

Why i did this changes ? Well, as per the reade me file  " If using autoMode="true", there is no need to modify anything to compress & minify the css. "

But i noticed that ever though i had auto mode enabled some how my client is requesting for  
<link type="text/css" href="style/css.axd?d=style.css" rel="stylesheet" />

and obviously there was no such file exists on the system. My original CSS file is <link href="stylesheets/StyleSheet.css" rel="stylesheet" type="text/css" />

I am further inverstigating why the CSS is not working.

Anyway, Without CSS changes my site is getting scroe between A and B that is much much better than before.

 

Apr 25, 2009 at 2:51 PM
If you have <link type="text/css" href="style/css.axd?d=style.css" rel="stylesheet" />, I can guess your original request was: <link type="text/css" href="style/style.css" rel="stylesheet" />
Thats the whole point in the AutoMode.  It change your response that the compression handler can handle and compress the css , js file.
Thats a normal behavior and shouldn't make your changes