Re: Sharing docum... OT Google sux

Thomi Richards <[email protected]> Fri, 22 May 2015 15:48:37 +1200
Newsgroups gmane.org.user-groups.linux.dunedin.general
Message-ID <CAN2KdQ-+f+jvr+L-1kbRGYc8GnqPvqgn=HMPwsy-8j=yD+a5xQ@mail.gmail.com>
Ugh. attempt two. Apparently this list doesn't like image attachments....


On 22 May 2015 at 15:33, worik <[email protected]> wrote:

> No.  I am already downloading data from the host.  Tacking some
> javascript into that download has a very small marginal cost.  Opening a
> connection to another site does not.  Putting the Java Script in the
> HTML will be the fastest solution, surely.
>

I'm no browser / networking expert, but I don't think that's correct.

Consider that:

* js / css / etc resources can be downloaded in parallel if they're in
different files. Inlining everything forces you to download the entire file
in one long bytestream. Splitting big files up allows simultaneous
connections to download these resources.

* Once you've done that, it makes sense to put images, css, and js library
code (which changes rarely, and is essentially static) into a CDN, so it's
as close as possible to your user (also, this means your servers don't get
hit with so many parallel requests).

The browsers total download time is much shorter. Modern browsers actually
let you look at this - consider:

http://i.imgur.com/hxLvljO.png?1

...which shows me hitting github.com. You can see how many resources are
fetched in parallel. Imagine downloading them all in one stream.


Anyway, getting off-topic a bit I guess :D


Cheers,


-- 
Thomi Richards

_______________________________________________
DunLUG mailing list
[email protected]
http://lists.ethernal.org/listinfo/dunlug
DunLUG Wiki - http://dunlug.kallisti.net.nz/