If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

This is a tip that I read about and used today for a site that I'm working on. It's not a PHP tip, but a JS tip.

I like to use jQuery and jQueryUI because they make it really easy to do cool things on your site in not a lot of time. The trouble is that they're huge, even with gzip. So, defer them until the page is loaded. Let this be the only JS that runs on your site in real time. It will call jQuery and any other JS that you need once the page is loaded. That way your web visitors are looking at banners while you load your JS libraries

Good point. You can also use mod_pagespeed from google. It has an optimization that rewrites your url's so jquery is included from google's servers instead of yours. They do this because chances are, the visitors browser already has the google version cached, so it doesn't have to load again on your site.

Another JS tip that Andrew recently performed. We used jquery in our performance ads, but as you pointed out, it's huge! Instead, he wrote everything out in native js. A bit less convenient for you as a programmer, but his code is now 100X smaller.

Oh I know, we spend a lot of time dealing with cross browser issues. For us it makes sense because we have to handle billions of requests. For an average shopping site you would never notice the difference i'm sure.

I would definitely agree with using jQuery for most projects. It didn't make sense on Performance Ads because it was blocking the rest of your content from loading while it downloads the library. The last thing we want is our ads slowing down your site.

This brings up a good point. A lot of us include multiple third-party js scripts on our sites. Be wary of what you are including. Don't let someone else's poorly written code affect the performance of the site that your are working so hard to optimize.