Re: Sharing docum... OT Google sux
worik <[email protected]> Fri, 22 May 2015 19:05:28 +1200
| Newsgroups | gmane.org.user-groups.linux.dunedin.general |
|---|---|
| Message-ID | <[email protected]> |
On 22/05/15 15:44, Thomi Richards wrote: > > On 22 May 2015 at 15:33, worik <[email protected] > <mailto:[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). Yes that is true. I was wondering when I wrote those words if I was being rash, rashness is a habit of mine. But I am not sure it is relevant to the user/browser. I expect the benefits accrue to the server much more than to the browser. > > The browsers total download time is much shorter. Modern browsers > actually let you look at this - consider the attached screenshot, > which shows me hitting github.com <http://github.com>. You can see how > many resources are fetched in parallel. Imagine downloading them all > in one stream. > The times in your example include the overhead of opening and closing all those sockets, albeit in parallel. The transmission time is likely to be negligible for the user. It will add up on the server. For huge JS files As for keeping libraries up to date there is no advantage to the user pulling them in from third parties and a disadvantage from diluted trust. Again it is an advantage to the server not the user. > > Anyway, getting off-topic a bit I guess :D That is where the fun lies... W -- Why is the legal status of chardonnay different to that of cannabis? [email protected] 021-1680650, (03) 4821804 Aotearoa (New Zealand) I voted for love _______________________________________________ DunLUG mailing list [email protected] http://lists.ethernal.org/listinfo/dunlug DunLUG Wiki - http://dunlug.kallisti.net.nz/