ssslippy Posted March 15, 2009 Posted March 15, 2009 Compressing JavaScript not only makes the download faster the code can be executed faster on the client side. The new post page has 11 JavaScript files. That is quite a few JavaScript files. Simple fact is smaller files save bandwidth and execution time. Note: I did try to search for this topic but it seems the word JavaScript is disabled in searches.
Connor T Posted March 15, 2009 Posted March 15, 2009 They won't compress in a BETA or RC because then you have to decompress then change something then re-do it. Don't worry about javascript compression till the final.
Rikki Posted March 15, 2009 Posted March 15, 2009 JS in 3.0 is now compressed on the fly at runtime and cached to the server, which is actually much more efficient than the old way we used to do it. You can enable this option by going into your system settings, and setting 'Use Minify' to On. I'm not sure if it's on by default or not right now, but I believe it will be in Final :)
Lewis P Posted March 15, 2009 Posted March 15, 2009 Has the JS and CSS been optimised yet, Rikki? I'm sure that will make the compression more worthwhile?
Rikki Posted March 15, 2009 Posted March 15, 2009 The CSS hasn't yet, but the JS went through some optimization when we were improving the loading speeds.
bfarber Posted March 16, 2009 Posted March 16, 2009 For the record we have minify on (at least last I knew). View our source code to see this.
Connor T Posted March 16, 2009 Posted March 16, 2009 so If I change the javascript for a mod or something. It gets auto compressed on load? Thats amazing. How come I've never heard of this tool before?
bfarber Posted March 16, 2009 Posted March 16, 2009 It's a relatively new tool I think. :) If you use our autoloader methods, then yes everything happens automatically. If you include your own JS via a script tag, you need to call minfiy appropriately yourself (just look at how we do it for an example).
Lee Craven Posted March 17, 2009 Posted March 17, 2009 It was turned of by default when I turned it on, my page was white and all links were posted like a craigslist page posted down in order. (I use GODADDY.COM for my host)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.