Changes to site.css not showing up?

Jul 5, 2009 at 9:34 PM

I wanted to change the orange background in the header so I changed the hex codes in site.css but they seem to have no effect on the site.

Am I missing something?

Everything else is runnung fine.

Jul 5, 2009 at 9:39 PM

That's because minified versions of the files are used. Try changing site.min.css (or minify site.css and replace currently used version).

Jul 6, 2009 at 11:11 PM

Thanks pawlos, this did the trick.

Do you know of a utility that will generate the min.css files from the uncompressed css files? I would like to automate this as part of the Visual Studio build process.

Jul 7, 2009 at 6:43 AM

There're a lot of those. Just google (or bing :)) for 'minify css' and pick your favourite one.

Developer
Jul 7, 2009 at 3:48 PM

This sort of problem seems ripe for a Visual Studio Package. If I can find open source .Net code that minifies, I'll see about wrapping it up so that css and js files are automatically minified in VS.

Jul 7, 2009 at 5:48 PM
Edited Jul 7, 2009 at 5:55 PM

Anyway, in the current project all css and javascript files are processed by the AssetHandler HttpHandler
On of the tasks of this module is to compress into a unique file ccs and javascript files referenced in each page
so, I am not sure that mimifying those files is still really helpfull
May be one remaining reason, mimyfied files are read faster by the AssetHandler HttpHandler

I hope Kazi can jump in and explain this further.
he really did a geat job with this prject and I learned a lof from it
It is pitty that we have not seen him here for a while now

 

 

Jul 7, 2009 at 6:05 PM

I think it does make sense to minify those files. Just site.css alone is 5 KB less when minified. Let alone all those js files that are used. But of course you are free to turn this feature off. In web.config Just replace minified css/js files with their unmodified counterpart.

Jul 7, 2009 at 7:13 PM

in the absolute, you're right it is better to minify this kind of files
However, in this project, those files are never sent drectly to the client
They all go first through the AssetHandler HttpHandler as I mentionned in my previous post
My understanding is, in this HttpHandler, they are compressed and then sent back to the client

Jul 7, 2009 at 7:52 PM

I just did a fast test with replacing all the files in js2 group (except for jquery and ui) to their non-minified version and the difference in used bandwidth is "just" 4 kB. So you can still gain from minifinig those files even though they are compressed.  I think that during the development of KiGG, Kazi and the team had all Yahoo's Best practices for Speeding Up Your Web Site in mind all the time.

 

Jul 7, 2009 at 11:50 PM

Thanks for this test and information

it is good to know