Should you use Combres with hosted scripts?

Jun 22, 2010 at 9:36 PM

Hi

 

I am wondering is it better to us combres with hosted scripts such as the jquery script hosted on googles CDN. I am asking because if you use the hosted on and merge it with your ones. Would that effect google caching? Like the whole idea behind it is if User A goes to site A and they use the google hosted on if User A comes to your site they  have a cached version of it.

But if you merge it through combres will it think it is a new file and redownload it?

Coordinator
Jun 23, 2010 at 9:46 AM

If you use Combres, end-users' browsers download the combined script from your web server.  If you want to maximize the benefit of CDN, you shouldn't include CDN scripts into Combres.  You should only serve local scripts/CSS with Combres in that case.  Both CDN and Combres has advantages and disadvantages, you should decide on a case by case basis.

Jul 15, 2010 at 3:02 PM
I have also noticed that if an external resource is included in any Combres resource block and is unavailable (due to a network issue, etc) then ALL combres blocks will not load appropriately. So, to that end, it's probably best to never source an externally-hosted resource using Combres.
Coordinator
Jul 19, 2010 at 7:59 AM

@baggachipz:

That's a correct observation.  Given that JavaScript files usually have dependencies, it usually doesn't make sense if Combres returns combined content which misses the content of one or more files in the same set.  It's therefore more appropriate if Combres just returns error HTTP response instead, when one or more files are failed to be loaded.