![]() Scripts/twitterbloggerv2.js scripts/ga_social_tracker.jsĪll those ones at the bottom support my code highlighter. Scripts/syntaxhighlighter_3.0.83/scripts/shBrushPython.js Scripts/syntaxhighlighter_3.0.83/scripts/shBrushVb.js Scripts/syntaxhighlighter_3.0.83/scripts/shBrushRuby.js Scripts/syntaxhighlighter_3.0.83/scripts/shBrushCss.js Scripts/syntaxhighlighter_3.0.83/scripts/shBrushJScript.js Scripts/syntaxhighlighter_3.0.83/scripts/shBrushXml.js Scripts/syntaxhighlighter_3.0.83/scripts/shBrushPowershell.js Scripts/syntaxhighlighter_3.0.83/scripts/shBrushCSharp.js Scripts/syntaxhighlighter_3.0.83/scripts/shLegacy.js Scripts/syntaxhighlighter_3.0.83/scripts/shCore.js ![]() Scripts/fancybox/jquery.fancybox-1.3.4.pack.js Themes/Hanselman/scripts/convertListToSelect.js Themes/Hanselman/scripts/activatePlaceholders.js Scripts\fancybox\jquery.fancybox-1.3.4.css Scripts\syntaxhighlighter_3.0.83\styles\shThemeDefault.css Scripts\syntaxhighlighter_3.0.83\styles\shCore.css set PATH=%~dp0 "C:\Program Files (x86)\Microsoft\Microsoft Ajax Minifier\" I've split these lines up for readability only. I also squished all the CSS, including my plugins that needed CSS, and put them in one file while being sure to maintain file order. I created a simple batch file that took the pile of JS from the top of my blog and the pile from the bottom and created a. ![]() A batch file and command line utility works nicely so I used AjaxMin (yes, it's made by Microsoft, but it did exactly what I needed.) workflow - does it fit into your life and how you work?įor me, I have a template language in my blog and I need to compress my CSS and JS when I deploy my new template.compatibility - does it break your CSS? It should never do this.Ultimately when compression percentages don't matter much, you should focus on two things: There's plenty of comparisons out there looking at the different choices. UPDATE: Cassette by Andrew Davey - Does it all, compiles CoffeeScript, script combining, smart about debug- and release-time.UPDATE: Combres - ".NET library which enables minification, compression, combination, and caching of JavaScript and CSS resources for ASP.NET and ASP.NET MVC web applications.".UPDATE: Chirpy - "Mashes, minifies, and validates your javascript, stylesheet, and dotless files.".SquishIt - Used at runtime in your ASP.NET applications' views and does magic at runtime.AjaxMin - Has MSBuild tasks and can be integrated into your project's build.NET Port that can compress on the fly or at build time. You can put them in your build files, or minify things on the fly. You run your code through these before you put your site live.Īnd some of these integrate nicely into your development workflow. There are JavaScript specific compressors. There's a lot of different choices, they are all within a few percentage points of each other, and everyone thinks theirs is the best one ever. There's lots of ways to "minify" CSS and JavaScript, and fortunately you don't need to care! Think about CSS/JS minifying kind of like the Great Zip File Wars of the early nineties. Optimize, Minify, Squish and GZip your CSS and JavaScript I want to make fewer request that may have larger payloads, but then those payloads will be minified and then compressed with GZip. Seems that speeding things up is not just about making things smaller, but also asking for fewer things and getting more for the asking. This page has 33 external JavaScript scripts. YSlow also tells me that I am making folks make too many HTTP requests: It was LOT bigger before and even sucked up gigabytes of bandwidth a few years back. I've also got 184k of JS, 21k of CSS and 30k of markup. YSlow such a wonderful tool and it will totally ruin your day and make you feel horrible about yourself and your site. ![]() In fact, that's often more of a problem then file size. It's not just about size, though, it's also about the number of requests to get the bits. It's important (and useful!) to send as few bytes of CSS and JS and HTML markup down the wire as possible. What's the old joke, "those who can't, teach." I show folks how to optimize their websites all the time but never got around to optimizing my own. It's funny how one gets lazy with their own website. You may feel free to add a comment at the bottom of this post, something like "Um, DUH!" after reading this.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |