Jump to content

Javascript compression in IPB 3.0

Featured Replies

Posted

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.

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.

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 :)

Has the JS and CSS been optimised yet, Rikki? I'm sure that will make the compression more worthwhile?

The CSS hasn't yet, but the JS went through some optimization when we were improving the loading speeds.

For the record we have minify on (at least last I knew). View our source code to see this.

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?

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).

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)

Any ideas on my last post?

Not off the top of my head, no ;)

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.