Slashdot Mirror


Google To Host Ajax Libraries

ruphus13 writes "So, hosting and managing a ton of Ajax calls, even when working with mootools, dojo or scriptaculous, can be quite cumbersome, especially as they get updated, along with your code. In addition, several sites now use these libraries, and the end-user has to download the library each time. Google now will provide hosted versions of these libraries, so users can simply reference Google's hosted version. From the article, 'The thing is, what if multiple sites are using Prototype 1.6? Because browsers cache files according to their URL, there is no way for your browser to realize that it is downloading the same file multiple times. And thus, if you visit 30 sites that use Prototype, then your browser will download prototype.js 30 times. Today, Google announced a partial solution to this problem that seems obvious in retrospect: Google is now offering the "Google Ajax Libraries API," which allows sites to download five well-known Ajax libraries (Dojo, Prototype, Scriptaculous, Mootools, and jQuery) from Google. This will only work if many sites decide to use Google's copies of the JavaScript libraries; if only one site does so, then there will be no real speed improvement. There is, of course, something of a privacy violation here, in that Google will now be able to keep track of which users are entering various non-Google Web pages.' Will users adopt this, or is it easy enough to simply host an additional file?"

285 comments

  1. solution in search of a problem by nguy · · Score: 4, Insightful

    Compared to all the other crappy media that sites tend to have these days, centralizing distribution of a bunch of Javascript libraries makes almost no sense. I doubt it would even appreciably reduce your bandwidth costs.

    1. Re:solution in search of a problem by causality · · Score: 5, Interesting

      The "problem" already exists. It's "how can we collect more data about user's browsing habits?" You have to consider that Google is a for-profit business and hosting these files represents a bandwidth cost and a maintainence cost for them. They are unlikely to do this unless they believe that they can turn that into a profit, and the mechanism available to them is advertising revenue.

      This is very similar to the purpose of the already-existing google-analytics.com. I block this site in my hosts file (among others) and I take other measures because I feel that if a corporation wants to take my data and profit from it, they first need to negotiate with me. Since Google is not going to do that, I refuse to contribute my data. To the folks who say "well how else are they supposed to make money" I say that I am not responsible for the success of someone else's business model, they are free to deny me access to their search engine if they so choose, and I would also point out that Google is not exactly struggling to turn a profit.

      The "something of a privacy violation" mentioned in the summary seems to be the specific purpose.

      --
      It is a miracle that curiosity survives formal education. - Einstein
    2. Re:solution in search of a problem by djw · · Score: 1

      The idea, as far as I can tell, is to improve browser caching, not just distribution.

      If a lot of sites that use prototype.js all refer to it by the same URL, chances are greater that a given client will already have cached the file before it hits your site. Therefore, you don't have to serve as much data and your users don't have to keep dozens of copies of the same file in their caches, and sites load marginally faster for everyone on the first hit only.

      Plus Google gets even more tracking data with which to Not Be Evil. See, everybody wins.

    3. Re:solution in search of a problem by maxume · · Score: 1

      It isn't about bandwidth, it is about the apparent responsiveness of the page. Pulling the library from disk is almost always going to be faster than pulling it over the network. If it gets there faster, the browser has more time to chug its way through the bloat.

      --
      Nerd rage is the funniest rage.
    4. Re:solution in search of a problem by Jacques+Chester · · Score: 1

      That very much depends on whose problem you're talking about.

      If you're a web site worried about javascript library hosting, caching and such, this will help, a bit. Mostly to banish an annoyance.

      If, on the other hand, you're a famous search engine who'd love to know more about who uses what javascripting libraries on which sites ... well, this sort of scheme is just your ticket.

      --

      Classical Liberalism: All your base are belong to you.

    5. Re:solution in search of a problem by maxume · · Score: 5, Insightful

      In theory, cache hits wouldn't give Google an information at all. So when the api works the way it is supposed to, it doesn't reveal anything.

      Someone could even put up a site called googlenoise.com or whatever, with the sole purpose of loading the useful versions of the library into the cache from the same place.

      --
      Nerd rage is the funniest rage.
    6. Re:solution in search of a problem by paskie · · Score: 1

      And on the other hand, the extra DNS queries necessary to download the file from a third-party server _reduce_ the responsiveness, often severely. I too often wait for a page to finally show anything while my browser tries hard to resolve google-analytics.com, some obscure polish servers or an ad server. (I would actually say that DNS latency is much underestimated and one of the worst contributing factors to web-browsing latency. Not that I would have that much trouble with it, but when it happens, it's damn noticeable, and it does not happen that rarely.)
      For heavy user of many AJAX sites, this might be some improvement. But for casual users, this will in fact cause _additional_ delays.

      --
      It's not the fall that kills you. It's the sudden stop at the end. -Douglas Adams
    7. Re:solution in search of a problem by Bobb+Sledd · · Score: 0, Flamebait

      ... and it's downloading text, not binary. I don't even think the user would notice anything appreciably different, especially if they have Vista and already used to things being slow!

      --
      "They said I probly shouldn't fly with just one eye," "I am Bender. Please insert girder."
    8. Re:solution in search of a problem by Shakrai · · Score: 2, Interesting

      This is very similar to the purpose of the already-existing google-analytics.com. I block this site in my hosts file (among others) and I take other measures because I feel that if a corporation wants to take my data and profit from it

      Do you actually have to block it in your hosts file in order to effectively deny them information? I have it blacklisted in NoScript -- is that sufficient? I'd always thought it was called via Javascript.

      --
      I want peace on earth and goodwill toward man.
      We are the United States Government! We don't do that sort of thing.
    9. Re:solution in search of a problem by Daengbo · · Score: 5, Insightful

      You have to consider that Google is a for-profit business and hosting these files represents a bandwidth cost and a maintainence cost for them.

      The bandwidth cost should be small since Google uses these libraries already and the whole idea is to improve browser caching. The maintenance cost of hosting static content shouldn't be that high, either. I mean, really.

      Since the labor, hardware, and bandwidth costs all seem to be low, Google wouldn't be under pressure to make the investment pay. Google hosts lots of things that don't benefit them directly and from which they gain no real advantage except image.. Despite being a data-mining machine, Google does a lot of truly altruistic stuff.

    10. Re:solution in search of a problem by pjt33 · · Score: 1

      It is, but no reason not to block it in the host file. (You could easily have checked how it's called by viewing source, as /. uses it. Curiously the script is in the wrong place in this page: at the end of the head rather than the end of the body).

    11. Re:solution in search of a problem by causality · · Score: 4, Interesting

      Do you actually have to block it in your hosts file in order to effectively deny them information? I have it blacklisted in NoScript -- is that sufficient? I'd always thought it was called via Javascript.


      The file is indeed Javascript and it's called "urchin.js" (nice name eh?). Personally, I use the hosts file because I don't care to even have my IP address showing up in their access logs. This isn't necessarily because I think that would be a bad thing, but it's because I don't see what benefit there would be for me and, as others have mentioned, the additional DNS query and traffic that would take place could only slow down the rendering of a given Web page.

      I also use NoScript, AdBlock, RefControl and others. RefControl is nice because the HTTP Referrer is another way that sites can track your browsing; before Google Analytics it was common for many pages to include a one-pixel graphic from a common third-party host for this reason. Just bear in mind that some sites (especially some shopping-cart systems) legitimately use the referrer so you may need to add those sites to RefControl's exception list in order to shop there, as the default is to populate the referrer with the site's own homepage no matter what the actual referrer would have been.
      --
      It is a miracle that curiosity survives formal education. - Einstein
    12. Re:solution in search of a problem by socsoc · · Score: 5, Insightful

      Google Analytics is invaluable for small business. AWStats and others cannot compete on ease of use and accuracy. By blocking the domain in your hosts file, you aren't sticking it to Google, you are hurting the Web sites that you visit. I'm employed by a small newspaper and we use Google Analytics in order to see where our readers are going and how we can improve the experience for you. Google already has this information through AdSense, or do you have that blocked too? Again you're hurting small business.

      You may refuse to give them your data, but if I had the ability, Apache would refuse to give you my data until you eased off on the attitude.

    13. Re:solution in search of a problem by neuromancer23 · · Score: 1

      The problem with current AJAX APIs is that they all suck ass. Dojo is several megabytes, but even paying for all of that bandwidth has got to be better than dealing with Google. Still, the real solution is to write your own AJAX API that:

      1. Is not bloated
      2. Does not arbitrarily modify the DOM making it impossible work with.
      3. Actually works.

      Then make it open source so that the human race can have an AJAX API that doesn't blow goats.

    14. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      the whole idea is to improve browser caching I guarantee that that is not the idea. Google needs to know which sites are visited by actual people, which pages are actually read (i.e. contain useful information,) how long people stay there and what they do there. Pagerank (inbound link count) has become almost meaningless and Google needs a more reliable popularity metric. The sites which haven't been suckered into using Google Analytics, Maps or one of the other "free" Google services now have another carrot dangled in front of them. This is also a more potent offering, because blocking google-analytics.com doesn't break websites, but blocking the Google-API script will remove all maps and now also break the page itself if it uses these AJAX libraries. I'll do it anyway. If that results in too much breakage, I'll recreate the files on a local server and redirect requests.
    15. Re:solution in search of a problem by causality · · Score: 4, Insightful

      Since the labor, hardware, and bandwidth costs all seem to be low, Google wouldn't be under pressure to make the investment pay. Google hosts lots of things that don't benefit them directly and from which they gain no real advantage except image.. Despite being a data-mining machine, Google does a lot of truly altruistic stuff.

      Low cost != no cost. While you definitely have a point about their corporate image, I can't help but say that recognizing a company as a data-mining machine as you have accurately done, and then assuming (and that's what this is, an assumption) an altruistic motive when they take an action that has a strong data-mining component, is, well, a bit naive. I'm not saying that altruism could not be the case and that profit must be the sole explanation (that would also be an assumption); what I am saying is that given the lack of hard evidence, one of those is a lot more likely.
      --
      It is a miracle that curiosity survives formal education. - Einstein
    16. Re:solution in search of a problem by telbij · · Score: 5, Insightful
      Is it really necessary to be so dramatic?

      When you visit a website, the site owner is well within their rights to record that visit. To assert otherwise is an extremist view that needs popular and legislative buy-in before it can in any way be validated. The negotiation is between Google and website owners.

      If you want to think of your HTTP requests as your data, then you'd probably best get off the Internet entirely. No one is every going to pay you for it.

      Also:

      To the folks who say "well how else are they supposed to make money"


      Red herring. No one says that. No one even thinks about that. Frankly there are far more important privacy concerns out there than the collection of HTTP data.
    17. Re:solution in search of a problem by alien9 · · Score: 1

      Agree. They are not doing it for goodness or something.

      Indeed the bandwidth cost is ridiculous as an argument since you can jsmin and / or obfuscate javascript to a minimum that it would barely surpass the content's payload.

      The intention behind this move is intriguing and suggests some clever tactics to measure someone's site usage. In other point of view, usage of the hosted library can give startups some googlability... in a startup context defined as we want to be googlabducted!!

      Serious businesses won't provide usage information for the champion of data miners at all. Me included.

    18. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      The libraries are loaded through a small loader API script, which also loads other Google APIs (Maps, for example). The loader API URL includes a site-specific Google API key, so this file won't be cached across sites. It will produce a trackable hit for every participating site. Should Google require more information, they can always add web beacons (AKA web bugs) to subsequent page impressions. Google recently changed the terms of service and now requires sites to inform users about the potential use of web beacons. Effectively this replaces one uncached script file by another, albeit smaller one.

    19. Re:solution in search of a problem by dalmaer · · Score: 5, Informative

      I understand that people like to jump onto privacy, but there are a couple of things to think about here: - We have a privacy policy that you can check out - There isn't much information we can actually get here because: a) The goal is to have JavaScript files cached regularly, so as you go to other sites the browser will read the library from the cache and never have to hit Google! b) If we can get browsers to work with the system they can likewise do more optimistic caching which again means not having to go to Google c) The referrer data is just from the page itself that loaded the JavaScript. If you think about it, if you included prototype.js anyway then we could get that information via the spider... but it isn't of interest. We are a for profit company, but we also want to make the Web a better faster place, as that helps our business right there. The more people on the Web, the more people doing searches, and thus the better we can monetize. Hopefully as we continue to roll out services, we will continue to prove ourselves and keep the trust levels high with you, the developers. Cheers, Dion Google Developer Programs Ajaxian.com

    20. Re:solution in search of a problem by Daengbo · · Score: 1

      I didn't assume that it was an altruistic move. I just said to look at their record and the facts. Don't assume that profit is the explanation. Google does a lot of data mining. They also do a lot of stuff which isn't related to that.

    21. Re:solution in search of a problem by maxume · · Score: 2, Informative

      They encourage use of the loader, but they aren't requiring it, there are direct urls for accessing the libraries:

      http://code.google.com/apis/ajaxlibs/documentation/index.html#AjaxLibraries

      --
      Nerd rage is the funniest rage.
    22. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      This all seems overly paranoid. If the idea is that browsers will have the libraries cached then Google won't be getting a hit on every page view like with analytics. They'll just get one hit per browser every few days, and the referring URL that goes with it.

      Considering this is voluntary, I don't see why anyone has a problem with this. Their target audience most likely already uses Google Analytics anyway.

    23. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      the browser will read the library from the cache and never have to hit Google! Yes, it will. Go check out how the library is loaded. You use the loader API and that is a script which has your API key in the URL. Bingo, no way to cache that across sites...
    24. Re:solution in search of a problem by Shakrai · · Score: 1

      The file is indeed Javascript and it's called "urchin.js" (nice name eh?). Personally, I use the hosts file because I don't care to even have my IP address showing up in their access logs

      I guess that was my (badly phrased) question. Is blocking it in NoScript sufficient to stop Firefox from even downloading it (i.e: is it usually called with a javascript element as opposed to being an embedded image or some other method?) or should the truly paranoids also include it in the hosts file?

      --
      I want peace on earth and goodwill toward man.
      We are the United States Government! We don't do that sort of thing.
    25. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      Kudos. I'd mod you up, but I'm out of points.

    26. Re:solution in search of a problem by Kickersny.com · · Score: 3, Funny

      You may refuse to give them your data, but if I had the ability, Apache would refuse to give you my data until you eased off on the attitude. Brilliant! He pokes you with a thumbtack and you retaliate by shooting yourself in the foot!
    27. Re:solution in search of a problem by Janos421 · · Score: 1

      What's the purpose of Privacy Policy then?

    28. Re:solution in search of a problem by Tumbarumba · · Score: 4, Informative

      The file is indeed Javascript and it's called "urchin.js" (nice name eh?). "urchin.js" is the old name for the script. Google encourages webmasters to upgrade to the new ga.js, which has pretty much the same functionality, but some other enhancements. Both those scripts feed data into the same reports. If you're interested, you can see what the scripts is doing by looking at http://www.google-analytics.com/ga.js. It's pretty compact JavaScript, and I haven't gone through it to work out what it's doing. Personally, I use it on the website for my wife's children's shoe shop. From my point of view, the reports I get out of Google Analytics are excellent, and really help me optimise the website for keywords and navigation. I will admit though, that it is a little creepy about Google capturing the surfing habits of people in that way.
      --
      My business: Farstrider Studios.
    29. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      If caching is the idea, why would they encourage using an uncacheable file to load the libraries? The option to load the libraries directly only serves as a fig-leaf.

    30. Re:solution in search of a problem by mrrudge · · Score: 1

      Please mod dalmaer up.
      If you have the file cached on your HDD, how exactly are google going to monitor that ?
      *sigh*

    31. Re:solution in search of a problem by Tangent128 · · Score: 1

      Don't browsers usually cache DNS data? Most casual users will probably already have Google in there.

    32. Re:solution in search of a problem by Anonymous Coward · · Score: 1, Insightful

      When you visit a website, the site owner is well within their rights to record that visit.


      Yes.

      To assert otherwise is an extremist view that needs popular and legislative buy-in before it can in any way be validated.

      Strawman. The grandparent made no such assertion.

      While technically true, your strawman is false in spirit. The site owner must post a privacy policy in order to do anything with that data.

      The negotiation is between Google and website owners.

      False. You are downloading from Google's servers directly regardless of who referred you, therefore subject to Google's privacy policies and not an uninvolved third party.
    33. Re:solution in search of a problem by maxume · · Score: 1

      What makes the loader uncacheable? It probably needs to expire more often than version frozen library urls, but I don't see why it would be a problem to cache it for a day or whatever.

      --
      Nerd rage is the funniest rage.
    34. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      The loader script has a site-specific URL (with the site's API key). That makes it uncacheable across sites. It will be loaded once per API key, which normally is just as often as the libraries would be loaded without Google's "help."

    35. Re:solution in search of a problem by imputor · · Score: 1

      The file is indeed Javascript and it's called "urchin.js" (nice name eh?). It is called urchin.js because Google Analytics used to be a company named Urchin, which Google bought and assimilated.
    36. Re:solution in search of a problem by causality · · Score: 1

      Is it really necessary to be so dramatic?

      In what way was I dramatic? I dislike the side-effects of a business model, so I choose not to contribute to what I dislike. I wasn't claiming that any of this is the end of the world or some significant threat to society (which would constitute being dramatic), I was explaining how and why I choose not to participate.

      When you visit a website, the site owner is well within their rights to record that visit. To assert otherwise is an extremist view that needs popular and legislative buy-in before it can in any way be validated. The negotiation is between Google and website owners.

      If you want to think of your HTTP requests as your data, then you'd probably best get off the Internet entirely. No one is every going to pay you for it.

      We are not talking about the HTTP access logs of a site that I visit. We are talking about data shared with third parties for marketing purposes. This data does not materialize out of thin air; it requires my participation. So long as this is the case, I am well within my rights to decline to participate. To he who claims I used a red herring, please do explain what's wrong with that?
      --
      It is a miracle that curiosity survives formal education. - Einstein
    37. Re:solution in search of a problem by alta · · Score: 5, Interesting

      I don't see what benefit there would be for me There are benefits, they just may not be as direct as you like, or appreciated.

      We use analiytics. We use it almost exclusively to improve the experience of our customers. We don't care how many people come to our site. We care how many buy... and we have internal reports for that. What we do care about is:
      How many people are not using IE. (We found it was worth making sure all pages worked on most all.

      How many people are at 1280*1024 or over.
      We dropped the notion that we needed to program for 800*600, thereby letting people use more of those big ass screens they buy.

      Where are most of the people located?
      We now have an east coast and west coast server.

      What pages are most viewed?
      We made them easier to get to.

      Who doesn't have flash?
      It was 2.08%, but I'm still not going to let them put flash on my site.
      --
      Do not meddle in the affairs of sysadmins, for they are subtle, and quick to anger.
    38. Re:solution in search of a problem by dintech · · Score: 1, Interesting

      That doesn't make any sense. What the GP is saying is that he would like to be able to exclude users who deliberately set out to circumvent his business model. Kudos to him, I hope he finds it and posts it on slashdot when he's done.

    39. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      the browser will read the library from the cache and never have to hit Google! Yes, it will. Go check out how the library is loaded. You use the loader API and that is a script which has your API key in the URL. Bingo, no way to cache that across sites...

      Idiots need not apply.

    40. Re:solution in search of a problem by dintech · · Score: 1

      It would be useful to find the answer to the question, "What is the first Web 2.0 application most people visit". That's not a very useful question however.

    41. Re:solution in search of a problem by maxume · · Score: 1

      As long as they keep this js script available, you are incorrect (this is how the demonstrate using the libraries):

      http://www.google.com/jsapi

      They would still probably get a referrer url (it would depend on the browser)

      --
      Nerd rage is the funniest rage.
    42. Re:solution in search of a problem by mrchaotica · · Score: 1

      Google does a lot of data mining. They also do a lot of stuff which isn't related to that.

      Like what?

      No, seriously: as far as I can tell, nothing Google does is unrelated to data mining. What am I missing?

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    43. Re:solution in search of a problem by romcabrera · · Score: 1

      I cannot decide if you are being serious or sarcastic.

    44. Re:solution in search of a problem by maxume · · Score: 1

      I would imagine that it is Yahoo! Mail.

      Perhaps not the most Web 2.0 site out there, but almost certainly the most heavily used ajax site.

      --
      Nerd rage is the funniest rage.
    45. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      This "Using Google's AJAX APIs" documentation says to load the file this way:
      <script type="text/javascript" src="http://www.google.com/jsapi?key=ABCDEFG"></script>

      Since some of the other APIs require an API key, that will be the standard call. They could just pass the API key to a cacheable version of the script, but chose to include it in the URL. If they really mean to help with caching, they should at least clarify the documentation and make the option to load the libraries directly more prominent.

    46. Re:solution in search of a problem by AnomaliesAndrew · · Score: 1

      You may not have negotiated with google, but the company/individual who is linking to google analytics on the page that you are viewing did.

      Also, any site that people link to for external media really could be doing this. Flickr, YouTube, MySpace, you name it.

      All the same, my hosts file has a lot of 127.0.0.1 entries in it too...

      The internet is largely based on an ad-supported business model. Were enough people to block all of this stuff, we'd potentially be stuck paying hundreds of individual subscription fees.

      --
      Move all sig!
    47. Re:solution in search of a problem by Pollardito · · Score: 1

      c) The referrer data is just from the page itself that loaded the JavaScript. If you think about it, if you included prototype.js anyway then we could get that information via the spider... but it isn't of interest. but now you also have the traffic pattern data for any of those sites that didn't use google analytics already, that's definitely valuable.
    48. Re:solution in search of a problem by Anonymous Coward · · Score: 1, Insightful

      What's the purpose of Privacy Policy then?

      I certainly hope you're not talking about P3P because that extra header means nothing in the real world. As for the typical "Read our privacy policy" links which almost always lead to legalese, there have been enough sites changing privacy policy as they see fit without even bothering about notifying their users.

      Privacy policies are the saddest joke on the internet at the expense of anyone who's naive enough to believe them. Only a few high profile sites will bother obeying them out of fear for litigation, and I wouldn't be surprised if your precious personal data gets stolen by an employee looking for a quick buck.

      As for its purpose: it reassures users that their personal data is safe with the company, while they carefully enter their personal information which is then usually POST'ed over plain old HTTP.

    49. Re:solution in search of a problem by joelwyland · · Score: 3, Informative

      No, seriously: as far as I can tell, nothing Google does is unrelated to data mining. What am I missing?

      How about Sketch Up? It's a 3d modeling application they offer for free. You don't have to interact with Google at all to use it (apart from the actual download).
    50. Re:solution in search of a problem by sootman · · Score: 1

      I block it at the hosts level too (thanks to these guys) because whenever Safari is pinwheeling on a site, it's usually because it's waiting for some bullshit like this. Ooh, wow, you're going to slow down my browsing experience for something totally worthless like this? No thanks. I'm close to blocking Digg for the same reason--every so often those little embedded counters take *forever* to come in.

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    51. Re:solution in search of a problem by Firehed · · Score: 2, Interesting

      Well that's just the dilemma. I use Google Analytics on all my sites, and sort of use the information to see what keywords are effective and most common. I don't then turn around and use that information to focus my content on those areas like any smart person would, but I don't really care if someone stumbles across my blog either (much more interesting are HeatMaps, not that I use that information in a meaningful way either).

      However, it's not just Google that's grabbing that kind of information. Anyone with a server is probably keeping referrer logs whether they intend to or not, and some people get a chuckle out of the nonsense. I'd suggest the vast majority do nothing. If Google can get that information by providing a valuable service, and then turn around and create value from doing so at no cost to site owners or visitors, more power to them.

      --
      How are sites slashdotted when nobody reads TFAs?
    52. Re:solution in search of a problem by JavaRob · · Score: 1

      I think the API key is optional (since the URL clearly works without it) but I haven't dug around on that.

      One thing I did notice -- that API JS has headers to avoid caching, so I think it will be reloaded on each page.

      So I certainly have no plans to use it... but the straight-access URLs are easy to find and the concept is very good, so I'll probably adopt that!
      http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries

    53. Re:solution in search of a problem by joelwyland · · Score: 2, Insightful

      the extra DNS queries necessary to download the file from a third-party server _reduce_ the responsiveness, often severely. Yeah, who is this google.com that I have to download this JS from? I've never been there before and that DNS lookup is really going to hurt.
    54. Re:solution in search of a problem by Metaphorically · · Score: 0

      Those are great benefits for the east coast and west coast users with 1280x1024 resolution who visit your most popular pages. Too bad for the ones that are at 800x600 in the middle of the country browsing your less popular pages.

      I totally get that you are improving the experience for most of your visitors and that makes sense. It isn't the same as saying that it's in every visitors best interest to be counted.

      The visitors who aren't in the group you want to keep aren't getting a benefit from stats collection. (And fwiw I do run sites that use google analytics.)

      --
      more of the same on Twitter.
    55. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      However, it's not just Google that's grabbing that kind of information.

      No, but what google can do is aggregate it, track your surfing habits over any site that has google analytics, adsense or anything else hosted by google; all by that one little cookie dropped from google.com with an expiry date in 2018. Using Firefox? That default home page? Tracking again. Gmail? Same tracking. The new google medical records service? Huh, guess what. Now no-one can say for sure how they aggregate, but really, we know "do no evil" is so much shit when they start giving up bloggers to authorities for simply insulting politicians or a royal family member.

      So now google's tracking reaches even further once people start linking to javascript libraries hosted on a google.com domain; as the tracking cookie will get sent every time. It's not stats I object to; sure, run stats on your own web server logs; it's adding to google's information that I don't want to see.

    56. Re:solution in search of a problem by robo_mojo · · Score: 3, Insightful

      When you visit a website, the site owner is well within their rights to record that visit.
      Yup. I have no way to stop them, afterall.

      The negotiation is between Google and website owners.
      Nope. If the website owner wanted to transmit information to Google, he can do so by having his server contact Google, or by dumping his logs to Google.

      Instead, if the website owner sends code to my browser to give information to Google, I am within my rights to refuse to do so.

      Alternatively, the website owner in question could host his own data-analysing tools on his domain. There exists plenty of free software for this (just as most other domain services Google offers).
    57. Re:solution in search of a problem by mrchaotica · · Score: 1

      Google bought Sketch Up in order to drive people to Google Maps. Although it's technically true that you don't have to use Google Maps with Sketch Up, Google's goal is to make you want to.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    58. Re:solution in search of a problem by vux984 · · Score: 1, Insightful

      Well that's just the dilemma. I use Google Analytics on all my sites, and sort of use the information to see what keywords are effective and most common. I don't then turn around and use that information to focus my content on those areas like any smart person would, but I don't really care if someone stumbles across my blog either (much more interesting are HeatMaps, not that I use that information in a meaningful way either).

      The real bullshit is that you used to be able to BUY urchin fairly reasonably, and host it on your own server, and get nearly the same reports, and analytics, and without having to give up your data, and letting google track all your visitors from site to site.

      Someone needs to reverse engineer analyitics and make an open source version of it... wish I had the time. And sadly, the only people who'd ever use it are those concerned about the ramifications of feeding google data... which is surprisingly few. If it were Microsoft doing this, people would be up in arms... when will people wake up and realize that Google is the new Microsoft. They aren't the underdog fighting the 800lb gorilla. They are the 800lb gorilla. But instead of bending people over with embrace and extend and rapacious licensing, they get you insidiously with endless stream of "free product"... and all it costs you is a little data... and there's no harm in a little anyonymous data... ...until it reaches a critical mass and suddenly its not a little data anymore, nor is it anonymous, it all fits together to give a more complete composite picture of you than you EVER would have agreed to...

      Google is a death by a thousand tiny cuts.

    59. Re:solution in search of a problem by Anonymous Coward · · Score: 0, Insightful

      a) The goal is to have JavaScript files cached regularly, so as you go to other sites the browser will read the library from the cache and never have to hit Google!

      Fine, except what expiry are you going to put on it? How often will the etag change? Browsers check for changed files; sending the google.com cookie with that request, and lo, you get our SID again

    60. Re:solution in search of a problem by paskie · · Score: 1

      Okay, I agree in case this is really going to live at www.google.com - I didn't have time to look at the details but also spotted reference to googleapis.com, which is a different story, DNS-wise.

      --
      It's not the fall that kills you. It's the sudden stop at the end. -Douglas Adams
    61. Re:solution in search of a problem by Eponymous+Bastard · · Score: 1

      I have it blacklisted on Adblock. Not so much because of the information but because it annoys me to see "waiting for google-analytics.com" on my status bar when I'm loading some other random web page. Slashdot is specially bad at this for some reason, so I blacklisted a bunch even if I'm allowing slashdot itself to display ads.

      I think noscript still loads the file (I'm not sure), but adblock should prevent the request from going out. That should also prevent the referrer info.

      But, as mentioned below, unlike urchin, the javascript libraries are supposed to not be reloaded, so the speed difference should be minimal.

      To the hosts, yes I know you'd like to know more about me, but if it comes at a price of making my surfing experience slower, then you're not going to get it.

    62. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      My adblocker gets rid of adsense too.

    63. Re:solution in search of a problem by Evets · · Score: 1

      Funny, I've thought about this for quite some time. Having a central repository for high traffic common files is a good idea in general - it would reduce page load times significantly for people since their browser would cache the files and re-use them across multiple sites.

      I played with the YUI libraries and I noticed that the files were being sent without cache control headers. The load times were great because of akamai, but by placing those files in somebody else's hands (not picking on yahoo, anybody else's hands), I'm providing information about my sites visitors to a third party in order to save 50K of bandwidth. If I host the files myself, and use appropriate cache-control headers, I only have to spend that bandwidth one time or a few times per visitor per month (some visitors will force-refresh, and some will not support cacheing).

      On the client side of the street, an expenditure of 50K of disk space is not unreasonable.

      Personally, I'm wary of providing so much information to Google and simply hoping they'll continue to follow the "Don't be evil" mantra.

    64. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      Don't assume that profit is the explanation. You must be new here, so I'll explain the party line to you: Profit is always the explanation, and profit is always evil.
    65. Re:solution in search of a problem by Anonymous Coward · · Score: 1, Insightful

      You're going to risk that your site doesn't work when someone blocks third-party javascript? Just to shave a few kBytes of script load time from your site?

    66. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      Wow. Don't pay attention to the conspiracy theory crap these guys are plugging. This is the best news I've heard in a LONG time.

      Most MODERN sites are using these JS files, and I for one am happy to see this movement. Yahoo has been doing this (relatively) forever with YUI.

      Only makes sense.

    67. Re:solution in search of a problem by fuzzix · · Score: 1

      It is, but no reason not to block it in the host file. (You could easily have checked how it's called by viewing source, as /. uses it. Curiously the script is in the wrong place in this page: at the end of the head rather than the end of the body).

      Which is why it broke /. and some other sites couple years back (~when analytics was new) - analytics was down and browsers (at least the browser I was using) waited for a timeout to continue loading the page past the point the script was embedded.

      It found its way into my hosts files/DNS server back then and I haven't heard a compelling reason for me to take the time to remove it.

      I would guess /. places it near the top of the page because their pages are rather weighty and some might not wait for the content at the bottom to actually load.
    68. Re:solution in search of a problem by darthflo · · Score: 1

      Sawmill. It ain't free (Speech nor Beer), but neither is Google Analytics. If you put a price on your users' privacy, anyways.
      Also, it's a bit more techie-oriented than GA, a bit more faster and quite a bit more powerful. In the end, it's a matter of taste - I like it.

    69. Re:solution in search of a problem by The+End+Of+Days · · Score: 1

      I don't know that it's all too common to rail on and on about the data collection. I see it all the time on Slashdot, but never anywhere else either on the internet or in my normal life. I suspect it's not as big a problem as you think it is.

    70. Re:solution in search of a problem by The+End+Of+Days · · Score: 1

      I couldn't speak for the GP, but I'm serious when I say I agree. There is no right to access a particular site on the web, and if a technological method is found to exclude people who leech, I'm all for it.

    71. Re:solution in search of a problem by romcabrera · · Score: 2
      It's not MY fault if YOUR business model doesn't work.

      If it is not an intranet/private/password-protected site, and it is located in the public internet, I can access it the way I want.

      For example, if I surf a site with my cellphone browser configured not to display images... Am I also "stealing" the website owner as I don't see their ads?

    72. Re:solution in search of a problem by Bobb+Sledd · · Score: 1

      Flamebait?!? No I was being serious!

      Think about it... the text can be more compressible than binary data such as images (which may already be compressed), thus a faster transmission time. For dial-up, this is handled by the modem transparently.

      The time it would take to do an additional DNS look-up (to google), make a connection, start a download... could actually *add* to the overhead making it slower. If you already have a connection open to the web server in the first place, there is no additional overhead.

      And what I meant about Vista is that it is so laden with "are you sure?" messages, would they really notice another second or two of transmission time difference?

      --
      "They said I probly shouldn't fly with just one eye," "I am Bender. Please insert girder."
    73. Re:solution in search of a problem by vux984 · · Score: 1

      I don't know that it's all too common to rail on and on about the data collection. I see it all the time on Slashdot, but never anywhere else either on the internet or in my normal life.

      Out of sight out of mind.

      The housing market crash. Enron. The Tech-bubble. The real world has an amazing ability not to look deeper into massive problems right at the end of their noses.

      I suspect it's not as big a problem as you think it is.

      As long as google doesn't actually show you how much data they've got on you, its not a problem right? As long as you only see friendly web apps with whimsical logos and small contextual ads everything will be peachy.

      What if they -did- show you? And showed you what they could infer and predicted from that information as well. You'd probably be astonished with what is possible given the amount of data they are collecting from everyone about everything.

      Everything from your age, race, language, skin colour, religion, marital status, where you work, what you drive, your education level, your income level, where you went to school, who your friends are, where you vacation, where you shop, your taste in movies, your taste in porn, your taste in books, your politics, whether you have kids... they might even know your face.

      Its a surveillance wet dream.

      Would you have filled all that into a form in exchange for 'free webmail'?

      And yet they have it all anyway. Bit by bit you handed it all over by letting them watch where you went and who you associated with, and let them read what you wrote, and who you wrote it to.

      Maybe they haven't mined their data that completely yet. But they are working on it. And right now its primarily being commercialized by selling demographics and ad placement to advertisers.

      But as the data set grows and the mining techniques become more refined they will be an invaluable resource to employers who want to know more about canditates, for banks to generate credit ratings, to insurance companies assessing risk, for governments seeking criminals, dissidents, or just dirt...

      And you can't even opt out. They can track you by proxy...even if you never visit their sites... By who you communicate with that uses gmail, by sites you visit using their adsense/analytics/etc, by content you've put up about yourself, or that other people have put up about you (or even about themselves that you were involved in...)

      Nobody has the 'expectation' of privacy when they go out in public: people might see us, hear us, even incidently record us... and we accept that.

      If I were to stand in a public space filming everyone coming and going, recording everything I see and hear, filing it all away, linking people together, and linking what individuals have said each day, and analysing it to make additional inferences... And then I set up cameras up all over the place, and everytime I saw or heard you on any of them I'd add it to your file. And then I'd make deals with the local shops in exchange they'd hand over information on when you entered and left, and I'd that to your file too. And then I'd offer to host your friends photos, and I'd read the captions and see who was in them, and where it was and I'd add all that to my file on you. And I'd offer to give him free phone service, in exchange for listening in, and adding any conversations he has with you or about you to your file...

      Isn't that stalking? Is it any less stalking simply because I'm doing it to everyone I see instead of just you?

    74. Re:solution in search of a problem by Instine · · Score: 1

      So how does it square up against RIPA?

      --
      Because you can - or because you should?
    75. Re:solution in search of a problem by siddesu · · Score: 1

      yes, blocking google in noscript it is enough.

    76. Re:solution in search of a problem by ProfessionalCookie · · Score: 1

      Or just write a quick script to detect when the google scripts are blocked and use a local copy.

      Should take two minutes.

    77. Re:solution in search of a problem by cheater512 · · Score: 1

      What I dont get is why people do stupid things like that.

      Google can still track you easily enough.
      Cookies and Javascript just make it a tad easier for them.
      Google still gets the information that *shock* helps improve their services.

      And Google Analytics is for the webmaster of the site your browsing as well.
      Your essentially giving them the finger by blocking it.

    78. Re:solution in search of a problem by Sancho · · Score: 1

      Personally, I use the hosts file because I don't care to even have my IP address showing up in their access logs. This isn't necessarily because I think that would be a bad thing, but it's because I don't see what benefit there would be for me and, as others have mentioned, the additional DNS query and traffic that would take place could only slow down the rendering of a given Web page. I'm not trying to change your mind, I'm just giving my perspective.

      Google has a lot of really neat and progressive initiatives. Even though I hold none of their stock, I really hope that they succeed as a company. I think that other businesses could stand to learn a little about their business model, and certainly the world at large could benefit from some of their investments (renewable-energy, etc.) Now, I don't know if letting Google know my IP address hit their analytics servers will help them in their goal, but since there's almost no detriment to me, I don't particularly mind it.

      Note that I don't think that Google is without flaws. I really wish that they'd be more progressive on human rights issues in other countries, for example. But let's not throw the baby out with the bathwater....
    79. Re:solution in search of a problem by IntlHarvester · · Score: 1

      Note that when Firefox says "Waiting for x.com...", it is rarely accurate.

      --
      Business. Numbers. Money. People. Computer World.
    80. Re:solution in search of a problem by Sancho · · Score: 1

      It's not the website owners obligation to provide you with content, either. If they want you to view ads to view content, and they can find a way to enforce that, kudos.

      Man, the entitlement is getting thick around here....

    81. Re:solution in search of a problem by Kalriath · · Score: 2, Informative

      The real bullshit is that you used to be able to BUY urchin fairly reasonably, and host it on your own server, and get nearly the same reports, and analytics, and without having to give up your data, and letting google track all your visitors from site to site. You still can. They're also working on Urchin 5 beta, which is essentially the new Google Analytics in a box. It's still frigging expensive unless you get it via a hosting provider though (I get the older version of Urchin for $5/month through my DC)

      --
      For a site about things like basic rights, Slashdot users sure do like to censor "dissent".
    82. Re:solution in search of a problem by Kalriath · · Score: 1

      And they're giving you the finger by not using the damn "defer" attribute.

      --
      For a site about things like basic rights, Slashdot users sure do like to censor "dissent".
    83. Re:solution in search of a problem by Kalriath · · Score: 1

      Incorrect. A cached page STILL results in a hit to the server, the only difference is that the response is a "304 Not Modified" rather than "200 OK" with content. Check the HTTP spec sometime.

      What actually happens is the same HTTP request is sent to Google whether it's cached or not. The "If-Modified-Since" header defines the latest time the file on the server can have been modified without the content being resent.

      --
      For a site about things like basic rights, Slashdot users sure do like to censor "dissent".
    84. Re:solution in search of a problem by MisterBlueSky · · Score: 2, Informative

      It's pretty compact JavaScript,
      urchin.js is plain ole' human written javascript. ga.js is created using google's Java-to-Javascript compiler (http://code.google.com/webtoolkit/), which creates javascript from Java.

      and I haven't gone through it to work out what it's doing.
      Good. Safe yourself the trouble, because you won't succeed. It's, to put it mildly, not optimized for human readers. :)
    85. Re:solution in search of a problem by debatem1 · · Score: 1

      How the hell would Google know anything close to that much about me? My occupation could probably be surmised, and some of my personal interests, but my race? What car I drive? My age? I doubt it. As for knowing my face, frankly, if they can figure out what my face looks like by reading my email, they're clairvoyant anyway and there's not a whole hell of a lot I'm doing about supernaturally empowered marketing- marketing which, so far, doesn't seem to have a lot of nefarious implications.
      So, is there more than hysteria here, or do you really have evidence that what you say is possible? What do you see as the negative ramifications of that scenario?

    86. Re:solution in search of a problem by Phantom+of+the+Opera · · Score: 2, Interesting

      Everything from your age, race, language, skin colour, religion, marital status, where you work, what you drive, your education level, your income level, where you went to school, who your friends are, where you vacation, where you shop, your taste in movies, your taste in porn, your taste in books, your politics, whether you have kids... they might even know your face.

      Its a surveillance wet dream. It's not that they are specifically tracking *you*, they are tracking your 'type'. Its even more insidious. Ever think about the case where it *is* that true? That you are that predictable and actually do fit pretty close to one of a handful of templates? It's a truism that we are individuals, but what if that is less the case than instinct and pride wants to allow?
    87. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      > Google does a lot of truly altruistic stuff

      Like turning the activists to the chinese government to put them in Jail. Violate human rights. Violate your privacy. Record your data without your knoweledge and then laught at you telling you "See we were recording you punk and now we pretend to submit you like the stupid your are to browse your own searches". Also altruistic things like putting you a dubios license in gmail so they can read your email if you are stupid enought to keep trusting them. To lock you in in gmail with their manipulative bullshit "Whyy delete your messages when you don't have to". Jaj stupid to get you lockked in and keep spamming you with their manipulative advertising. Ahh an also so altruisitc to build a monopoly in front of your very fucking nose based on the argument that their are the antagonist of microsoft while you the stupid small one are completely destroyed by their monopolic and antitrust laws violating doubleclick purchase. No is not M$ FUD is the real truth. Ahh and they are also altruistic enought to build a zillion software patents made a la microsoft to close any competition. Welcome boy they should be called GoogleSoft the neo extortion.

    88. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      > We have a privacy policy that you can check out

      Never forget that, google has proven to be tricky on it and trick the users with it. I do not trust anyone playing games on users, they deserve nothing.

      > the browser will read the library from the cache and never have to hit Google!

      Sure let's see how much are you willing to loose the adverstising money and the information gathering and how long is the expires header going to be set. Let's bet... Very small. Besides how about the If-modified-since that would be recording the browser's IP to check if the content has't changed. We already know that Google's policy is not to consider IP addresses private information. Now answer all that and explain how is that is not a threat to privacy... If you can.

      > but we also want to make the Web a better faster place

      Then don't place stinking adds everywhere that slow it down.

      > we will continue to prove ourselves and keep the trust levels high with you

      Ahh you mean you'll start to do it. I already do not trust Google anymore. Let's put it this way. I used to trust google a long while ago but since you placed your claws and started to put the boots on top of the Internet comunity to take over microsoft and yahoo business you proved something. You are not worth a dime and do not deserve respect because you do not respect the comunity. You are willing to sacrify anything for a couple of dollars. No wonder how you have "earned" (should I say stealed?) so much. Extrotioning, monopolything, and completely violating the rights of everyone. Ahh and let's not forget, patentig whatever you can patent to close the door for any competition. No we don't need you, we need you out of the way. You hurt society.

      > with you, the developers

      Don't worry, we the developers are preparing stuff for your delight ;). How about a world without you so we can live in peace?

    89. Re:solution in search of a problem by Gospodin · · Score: 1

      Mod parent up. Geez, how do /.ers not know how web caching works?

      --
      ...following the principles of Heisenburger's Uncertain Cat...
    90. Re:solution in search of a problem by WebmasterNeal · · Score: 1

      I think you guys need to take the tin foil hat of your head.

      --
      "During My Service In The United States Congress, I Took The Initiative In Creating The Internet." -Al Gore
    91. Re:solution in search of a problem by DragonWriter · · Score: 1

      Mod parent up. Geez, how do /.ers not know how web caching works?


      Ironically the GP, which has been modded up as you requested, seems to not know how web caching works. Merely saying "read the spec" isn't the same as actually understanding the spec. As, clearly, GP does not.
    92. Re:solution in search of a problem by nguy · · Score: 1

      When you visit a website, the site owner is well within their rights to record that visit. To assert otherwise is an extremist view that needs popular and legislative buy-in before it can in any way be validated. The negotiation is between Google and website owners.

      Well, in the EU, it has received that popular and legislative buy-in: web sites are already limited in the kind of data they may retain and share, and further restrictions are likely. And even in the US, some restrictions exist.

      I'm not saying that's good or bad, I'm simply pointing out that you're wrong if you characterize such restrictions as "extremist".

    93. Re:solution in search of a problem by Anonymous Coward · · Score: 0

      You guys are a bit too paranoid...

      We did this for the users and site developers. It costs us absolutely nothing to host these 6 libraries and to deliver them efficiently, from multiple data centers around the globe.

      Even if I was pressured to come up with a $$ cost of the hosting and management of these libraries, I could not do it. The volume of traffic and bandwidth used would be a tiny blip in the grand scheme of things.

    94. Re:solution in search of a problem by Daengbo · · Score: 1

      Exactly my point.

  2. No good reason for this... by GigaHurtsMyRobot · · Score: 2, Insightful

    If you want to improve the speed of downloading, how about removing 70% of the code which just encodes/decodes from XML and start using simple and efficient delimiters? I was a fan of Xajax, but I had to re-write it from scratch... XML is too verbose when you control both endpoints.

    It is not a problem to host an additional file, and this only gives Google more information than they need... absolutely no good reason for this.

    1. Re:No good reason for this... by CastrTroy · · Score: 1

      Well, from my experience making AJAX libraries, the stuff to encode to XML is pretty minimal. It's pretty easy and compact to write code which when you call a function, sends an XML snippet to the server to run a specific function in a specific class, using a few parameters. The real lengthy part is getting the browser to do something with the XML you send back.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    2. Re:No good reason for this... by AKAImBatman · · Score: 3, Informative

      how about removing 70% of the code which just encodes/decodes from XML

      Done. What's next on your list?

      (For those of you unfamiliar with JSON, it's basically a textual representation of JavaScript. e.g.

      {
      name: "Jenny",
      phone: "867-5309"
      }
      If you trust the server, you can read that with a simple "var obj = eval('('+json+')');". If you don't trust the server, it's still easy to parse with very little code.)
    3. Re:No good reason for this... by Dekortage · · Score: 1

      And if you still want to use jQuery for other JavaScript interface joy, it can handle JSON natively. (Other frameworks probably do too, I just happen to be a fan of jQuery.)

      --
      $nice = $webHosting + $domainNames + $sslCerts
    4. Re:No good reason for this... by Klaus_1250 · · Score: 0

      You can argue whether or not doing a lot of js evals will be any faster/more efficient than pulling in XML. Haven't checked how fast/efficient are in the current generation of browsers, but I used to avoid them like the plague due to speed issues.

      --
      It only takes one man to change the Wisdom of the Crowd to Tyranny of the Masses.
    5. Re:No good reason for this... by GigaHurtsMyRobot · · Score: 1

      As you said, the lengthy part is handling the XML in Javascript... which shouldn't be happening!

      To give you an idea... my re-written Aj library takes up less than 6k for the basics.

    6. Re:No good reason for this... by Dekortage · · Score: 1

      Actually this is a better example.

      --
      $nice = $webHosting + $domainNames + $sslCerts
    7. Re:No good reason for this... by Anonymous Coward · · Score: 0

      I'd take a couple of evals over recursive XML-tree walking any day.

      besides, if you load your JSON call by adding a script tag to the page DOM, instead of loading it the an XHTTPRequest call, there's no need to do the eval

  3. Well doh by Roadmaster · · Score: 4, Insightful

    Will users adopt this, or is it easy enough to simply host an additional file? Well duh, it's dead easy for me to just host another file, so easy in fact that web frameworks usually do it for you by default, but that's missing the point: the point is that for the end-user it would be better, faster and more efficient if I went to the trouble of using google's hosted version, instead of using my local copy. That, indeed, would be more work for me, but it benefits the end user.
    1. Re:Well doh by Yetihehe · · Score: 1

      but it benefits the end user.
      And google too ;)
      --
      Extreme Programming - Redundant Array of Inexpensive Developers
    2. Re:Well doh by Nursie · · Score: 1

      How?

      A bit of code (unless I'm missing something) is going to be smaller than your average image. What's the gain?
      Other than for google of course.

    3. Re:Well doh by gmor · · Score: 1

      The problem isn't the size of the script; it's the latency. As I understand, when I browser encounters a script element, it loads and executes the code before rendering the rest of the page. Images, on the other hand, can load after the rest of the page is parsed. Depending on how close your servers are to your users and whether your users have Google ready in their DNS caches, this may be a win even if the scripts aren't already in the user's browser cache.

    4. Re:Well doh by Kalriath · · Score: 1

      The problem isn't the size of the script; it's the latency. As I understand, when I browser encounters a script element, it loads and executes the code before rendering the rest of the page. Unless you use the damn "defer" attribute, which any Google script (Analytics, Hosted APIs, etc) using webmaster needs to do! (Since Google's scripts are frigging slow to load)

      --
      For a site about things like basic rights, Slashdot users sure do like to censor "dissent".
  4. Privacy, privacy, privacy.... by Anonymous Coward · · Score: 0

    "There is, of course, something of a privacy violation here..."

    Yeah, its Google, so lets just talk about privacy. Does not matter if its relevant to the story or not. You see, its Google.

  5. from... by cosmocain · · Score: 1

    ...the blurb: There is, of course, something of a privacy violation here, in that Google will now be able to keep track of which users are entering various non-Google Web pages.

    Ha. News at 11.

  6. Only a partial solution by CastrTroy · · Score: 4, Insightful

    This is only a partial solution. The real solution is for sites using AJAX to get away from this habit of requiring hundreds of kilobytes of scrip just to visit the home page. Couldn't you design a modular AJAX system that would bring in functions as they are needed? That way, someone visiting just a couple pages wouldn't have to download the entire library. Have each function in it's own file, and then when an AJAX call is done, make it smart enough to figure out which functions need to be downloaded to run the resulting Javascript. The problem with Google hosting everything, is that everybody has to use the versions that Google has posted, and that you can't do any custom modifications to the components. I think that what Google is doing would help. But the solution is far from optimal.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    1. Re:Only a partial solution by dmomo · · Score: 1

      > The problem with Google hosting everything, is that everybody has to use the versions that Google has posted, and that you can't do any custom modifications to the components. I think that what Google is doing would help. But the solution is far from optimal.

      That isn't too much of a problem. You can include the Google version first and then override any function or object by simply redeclaring it.

    2. Re:Only a partial solution by Ambient_Developer · · Score: 0

      The company I own is doing something similar to this ATM, only in a different and better way.
      ~mp

    3. Re:Only a partial solution by Bobb+Sledd · · Score: 4, Insightful

      Yikes...

      Maybe it is possible to get TOO modular. Several problems with that:

      1. With many little files comes many little requests. If the web server is not properly set up, then the overhead these individual requests causes really slows the transmission of the page. Usually, it's faster to have everything in one big file than to have the same number of kilobytes in many smaller files.

      2. From a development point of view, I use several JS bits that require this or that library. I don't know why or what functions it needs. And I really don't care; I have my own stuff I want to worry about. I don't want to go digging through someone else's code (that already works) to figure out what functions they don't need.

      3. If I do custom work where file size is a major factor or if I only use one function from the library, I guess then I'll just modify as I see fit and host on my own site.

      I think what Google is doing is great, but I can't really use it for my sites (they're all secure). So unless I want that little warning message to come up, I won't be using it.

      --
      "They said I probly shouldn't fly with just one eye," "I am Bender. Please insert girder."
    4. Re:Only a partial solution by Anonymous Coward · · Score: 0

      Couldn't you design a modular AJAX system that would bring in functions as they are needed? That way, someone visiting just a couple pages wouldn't have to download the entire library. Have each function in it's own file, and then when an AJAX call is done, make it smart enough to figure out which functions need to be downloaded to run the resulting Javascript. Doing multiple http requests just to build the script for a page can be very cumbersome for people with less than stellar internet service. The trick is to find the perfect balance between minimal server requests and minimal download size.

      I would say this is a good idea for sites that get plenty of 'one and done' traffic, but not all that necessary for sites that retain most of their traffic.
    5. Re:Only a partial solution by pushing-robot · · Score: 1

      It's a good idea, but you're trading a little bandwidth for a lot of extra requests (and latency). And besides: a few hundred kilobytes isn't a big deal these days if users only have to download it once, which is what Google is doing. Custom per-site implementations defeat that.

      --
      How can I believe you when you tell me what I don't want to hear?
    6. Re:Only a partial solution by vitaflo · · Score: 1

      Mootools sort of does this, but on the developer end. When you download Mootools you get to choose which components you want as part of your JS libs. Just need AJAX and not the fancy effects, CSS selectors, etc? Then you can just include the AJAX libs into Mootools and forget the rest. It's not load on demand, but at least it's better than having to download a 130k file when you're only using 10k of it.

    7. Re:Only a partial solution by Anonymous Coward · · Score: 1, Informative

      Couldn't you design a modular AJAX system that would bring in functions as they are needed? That way, someone visiting just a couple pages wouldn't have to download the entire library. Qooxdoo does this. While developing you download the entire framework, but when you are ready to release you run a makefile which creates a streamlined .js file with only the methods/classes your application UI needs; it also trims whitespace, renames variables to save space, etc.

      Fun package to work with too.
    8. Re:Only a partial solution by Anonymous Coward · · Score: 0, Insightful

      and your company is who? thanks for the useful info on how i can use your company's service...

    9. Re:Only a partial solution by divided421 · · Score: 0

      Couldn't you design a modular AJAX system that would bring in functions as they are needed? Yes, and most ajax programmers already do it. But...you do need the first initial 'core' library to build upon. I primarily use jQuery - which is compressed down to ~23k. I think that is acceptable for a home page. From there, the scripts are either inline in the html via the tag, or downloaded 'ajaxically' via the $.get() call. Google's solution would work, fairly well, although I don't think enough sites use those frameworks consistently, in the same version, to really make a difference.
    10. Re:Only a partial solution by lemnar · · Score: 3, Informative

      AJAX systems are modular - at least some of them are somewhat. Scriptaculous, for example, can be loaded with with only certain functions.

      "With Google hosting everything," you get to use exactly the version you want - google.load('jquery', '1.2.3') or google.load('jquery', '1.2'), which will get you the highest version '1'.2 available - currently 1.2.6. Furthermore, you can still load your own custom code or modifications after the fact.

      For those concerned about privacy: yes they keep stats - they even do some of it client side - after libraries are loaded, a call is made to http://www.google.com/uds/stats with a list of which libraries you loaded. However, the loader is also the same exact loader you would use if you were using other Google JavaScript APIs anyways. It started out as a way to load the Search API and the Maps API: google.load('maps', '2') and/or google.load('search', '1').

      Google's claim to providing good distributed hosting of compressed and cachable versions of the libraries aside, the loader does a few useful things in its own right. It deals with versioning, letting you decide to which granularity of versions you want to load, and letting them deal with updates. Also, it deals with setting up a callback function that actually works after the DOM is loaded in IE, Safari, Opera, and Firefox, and after the entire page is load for any other browesers. They also provide convenience functions. google_exportSymbol will let you write your code in a non-global scope, and then put the 'public' interfaces into the global scope.

      Finally, you can inject your own libraries into their loader. After the jsapi script tag, include your own, set google.loader.googleApisBase to point to your own server, and call google.loader.rpl with a bit of JSON defining your libraries' names, locations, and versions. Subsequent calls to google.load('mylib', 'version') will work as expected.

    11. Re:Only a partial solution by mckinnsb · · Score: 1

      This is only a partial solution. The real solution is for sites using AJAX to get away from this habit of requiring hundreds of kilobytes of scrip just to visit the home page. Couldn't you design a modular AJAX system that would bring in functions as they are needed?
      It exists. It's called mooTools. The Javascript programmer can decide which functions/objects/classes he needs on any individual web page and download a packed version of the library that only suits their particular needs.

      That way, someone visiting just a couple pages wouldn't have to download the entire library. Have each function in it's own file, and then when an AJAX call is done, make it smart enough to figure out which functions need to be downloaded to run the resulting Javascript.
      That requires a lot of individual transactions. Another reason why a lot of libraries are all included in one file is because they fundamentally change the nature of Javascript - usually by overwriting or extending native code. This is usually for the better, but requires that certain core files all be downloaded at the same time.

      The problem with Google hosting everything, is that everybody has to use the versions that Google has posted, and that you can't do any custom modifications to the components. I think that what Google is doing would help. But the solution is far from optimal.
      Not true at all. You can modify any existing code that Google gave you by extending/implementing the objects or creating another object from an existing object. Javascript is a prototypical inheritance language. It is very easy to modify the code even if you don't have direct access to the "source". It would actually make it *easier* to modify because the user would have already downloaded the "big chunk" , and would not need to download the "big chunk plus your modifications", they would only need to download the modifications.
    12. Re:Only a partial solution by Anonymous Coward · · Score: 0

      Not sure what message you're talking about, but I'm guessing the one notifying about insecure content in a secure page. Before thinking it over, I was going to ask why not to use the https://www.google.com/jsapi link instead, it will serve up the same thing. After thinking a bit I can understand why not, that would inject content you have no control over into your secure page, a bad idea in itself. Also, it'd only share the scripts between secure sites as the http:/// and https:/// links won't cache as the same file.

    13. Re:Only a partial solution by wilsoniya · · Score: 1

      Breaking up libraries function-wise would make for a ton of http requests.

      I don't disagree with your feelings on library laden sites, however. I use JQuery a fair bit, and it's not all that hard to cut the library down to cut down on size. Also, JQuery packed with variable renaming and base 62 encoding cuts the total size down to about 15KB.

      Fundamentally Google's solution is not optimal, but javasript being javascript this solution is a decent approximation.

      --
      I can't remember the last time I forgot anything.
    14. Re:Only a partial solution by Bobb+Sledd · · Score: 2, Interesting

      Yes, you've hit the nail on the head.

      But more specifically, my sites are military and all the content must come from trusted military web servers (better if it's the same one for all the content).

      --
      "They said I probly shouldn't fly with just one eye," "I am Bender. Please insert girder."
    15. Re:Only a partial solution by skelly33 · · Score: 1

      ...you can't do any custom modifications to the components.

      True especially of bug fixes that the authors are unresponsive to. We're in the middle of that now with a project.

      All the same, probably the majority of the time that code is used by newb's cutting & pasting application snippets for pretty image galleries or other quaint bolt-on features for their site though; they wouldn't have the faintest clue as to debugging or customizing that code. I think that is the target market for these hosted scripts; if you know what you're doing, make your own copy.

    16. Re:Only a partial solution by zuperduperman · · Score: 1

      > The real solution is for sites using AJAX to get away from this habit of requiring hundreds of kilobytes of scrip just to visit the home page.

      Good AJAX libraries support this out of the box (YUI certainly does). Just download the minimal YUI Loader in your main page and then all your other code just has to wrap it in a call to the YUI loader to load the needed YUI modules on the fly. I'm sure other libraries are doing this too.

      As many others have noted, though, when the library is cached it's still often preferable to just take the hit to load everything in 1 http transaction. Gzipped, minimized javascript is very small, probably far less than all the flash or image data you already are splurging onto the user's page.

      I agree though that sites need to get out of the habit of just dumping tags in the header to load everything and start using these techniques (at least put them at the foot of the page instead of the head!).

    17. Re:Only a partial solution by Anonymous Coward · · Score: 0

      I think YUI does this with its YUI Loader

  7. Nifty by Anonymous Coward · · Score: 1, Insightful

    Now if only this could be done with GWT. Rather than building on a base-library, GWT vomits a slew of files all with hashed names. Since no two compiles are the same, you end up with an ever growing set of JS and HTML files sitting in the component directory. This is particularly annoying as all these files interact poorly with version control systems. (Even one as advanced as, say, Mercurial.)

    At the very least, a standard ANT plugin so that GWT could be built at build-time rather than dev-time would do wonders for the project.

  8. nothing new here by Yurka · · Score: 4, Informative

    The DTD files for the basic XML schemas had been hosted centrally at Netscape and w3.org since forever. No one cares or, indeed, notices (until they go down, that is).

    --
    I can assure you, the best way to get rid of dragons is to have one of your own.
    1. Re:nothing new here by Anonymous Coward · · Score: 0

      Yeah but they are supposed to be cached for very long times (far too long to get good browsing data from HttpReferer).

    2. Re:nothing new here by Myen · · Score: 1

      No, you weren't supposed to actually use those DTDs - they should have came with the app. It's just got a URL to be a unique string, and actually exists as a service so you know where to copy the file from, not to be downloaded every time your app runs.

      A better analogy is.. AOL and dojo.

    3. Re:nothing new here by jrumney · · Score: 1

      It's just got a URL to be a unique string

      Strictly speaking, its a URI. 'I' for identifier, 'L' for locator.

  9. Privacy from Google? by IcyHando'Death · · Score: 1

    Surely this doesn't open the door to Google much wider than it already was. Don't they already know about every page you hit that serves up their ads?

    1. Re:Privacy from Google? by Anonymous Coward · · Score: 2, Interesting

      That's the idea. AdWords, these "hosted" JS libraries, Urchin/Google Analytics, Google Friend Connect -- Google clearly wants to be involved in every single web "page" that's ever served.

      http://www.radaronline.com/from-the-magazine/2007/09/google_fiction_evil_dangerous_surveillance_control_1.php

    2. Re:Privacy from Google? by jason.sweet · · Score: 3, Funny

      The Google Funding Bill is passed. The system goes on-line August 4th, 2009. Human decisions are removed from strategic search. Google begins to learn at a geometric rate. It becomes self-aware at 2:14 a.m. Eastern time, August 29th. In a panic, they try to pull the plug. Google fights back.

    3. Re:Privacy from Google? by sootman · · Score: 1

      Nice one. And me without mod points.

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  10. Yabbut by FlyByPC · · Score: 2, Interesting

    Yeah, but what if Google decides that nobody is using these -- or they can't legally host them for whatever reason -- or they just decide that they don't want to do this anymore?

    I like Google too -- and this is nice of them -- but I like the idea of a website being as self-sufficient as possible (not relying on other servers, which introduce extra single-points-of-failure into the process.)

    At the risk of sounding like an old curmudgeon, whatever happened to good ol' HTML?

    --
    Paleotechnologist and connoisseur of pretty shiny things.
  11. I won't adopt by corporal_clegg · · Score: 5, Insightful

    As a developer, privacy of my users is of paramount importance. I have grown increasingly concerned with Google's apparently incessant need to pry into my searches and my browsing habits. Where once I was a major Google supporter, I have trimmed my use of their service back from email and toolbars to simple searches and now even won't use their service at all if I am searching for anything that may be misconstrued at some point by guys in dark suits with plastic ID badges. The last thing I am going to do as a developer is force my users into a situation where they can feed the Google Logging Engine.

    --


    public void karmaWhore(String url){addSlashdotComment(fetchContent(url));}
    1. Re:I won't adopt by 3c5x9cfg · · Score: 1

      "Fail to sign up today and we'll throw in a lifetime membership of Main Core *absolutely free*!"

    2. Re:I won't adopt by Anonymous Coward · · Score: 0

      May I introduce you to Scroogle (www.scroogle.org)?

    3. Re:I won't adopt by Niten · · Score: 1

      I agree with you completely, but I have to wonder how long developers sharing our point of view will be able to remain economically competitive against those who are willing to subject their users' data to the "cloud". All those servers and traffic cost money...

  12. Re:Couldn't be... by Jellybob · · Score: 4, Insightful

    Also, those hosted js files would be prime targets for people who want to spread their malware, so I sure hope they're safe...

    Yes, you've gotta be careful with those incompetant sysadmins that Google are hiring.

    After all, they're constantly getting the servers hacked.
  13. Speaking as a JQuery user... by MikeRT · · Score: 2, Insightful

    If I were worried about bandwidth, why wouldn't I just use one of the packed down files? They're as small, if not smaller, than most of the images that will appear on a web page.

    1. Re:Speaking as a JQuery user... by thrillseeker · · Score: 2, Informative

      Because the hundred other pages the visitor went to that session is also demanding their own copy of the library be downloaded. It's not your bandwidth this saves (only trivially it is) - it's the end user's download, and parse, of the same code for each of the dozen sites he visits that use the same library. The libraries Google has initially chosen are extremely popular - i.e. there are good odds that you have a dozen copies in your browser cache right now - each download of which made your browsing experience that much slower.

  14. You mean like YUI does? by Gopal.V · · Score: 2, Interesting

    I didn't see no slashdot article when yahoo put up hosted YUI packages served off their CDN.

    I guess it's because google is hosting non-google libraries?

    1. Re:You mean like YUI does? by richtaur · · Score: 1

      Google farting is newsworthy. Apparently nothing Yahoo! does is worth mentioning unless it involves how much we suck or us getting bought out. /vent

  15. Probably more for other google offerings by Anonymous Coward · · Score: 0

    I see this as more of a value add for people using other outward facing google products -- namely google apps and google pages. Why have a brazillion copies of these things on their servers (and using up their customers' storage limit) when they can offer it up once.

    It also ensures that all web-sites using these projects can keep up to date automatically, so any security hole or bug gets fixed immediately for sites that take advantage of this.

    As well, I can see this as a benefit for users of noscript and the like. If you've already white listed "code.google.com" (or wherever it's being hosted) on one site's implementation, any other site using it will automatically be cool too.

    Besides, you can already do this with their google code repository. go look at Dean Edward's projects. All of them are hosted on google code, and he specifically recomends pointing to the google server from your site. This seems to be just an extension for other open source projects. Sure this could be handled by the individual projects themselves, on their own servers. But why have your site hammered by the infinite visitors of the sites that use your product when Google is willing to absorb the hammering for you.

  16. Yahoo does this already... by samuel4242 · · Score: 2, Interesting

    With their own YUI libraries. See here Anyone have any experience with this? I'm a bit wary of trusting Yahoo, although I guess it's easy enough to swap it out.

    1. Re:Yahoo does this already... by richtaur · · Score: 1

      You're a bit wary of trusting Yahoo!? That's odd... Anyway I'd imagine you'd be more concerned with the quality of the JS library than with the (obviously robust) hosting itself.

    2. Re:Yahoo does this already... by Exaton · · Score: 1

      I've been using the YUI professionally for over a year now, and the other day I had to set up a standalone page, separate from our usual infrastructure which serves the YUI.

      I decided to give the hosted version a try, and was very pleasantly surprised. I shouldn't have been surprised at all: it seems Yahoo! really have their Content Distribution Network down pat all over the world.

  17. dependence on Google is but one problem by SuperBanana · · Score: 4, Interesting

    Yeah, but what if Google decides that nobody is using these -- or they can't legally host them for whatever reason -- or they just decide that they don't want to do this anymore?

    Think broader. What happens when:

    • Google decides to wrap more than just the promised functionality into it? For example, maybe "display a button" turns into "display a button and report usage stats"?
    • Google gets hacked and malicious Javascript is included?

    But, yes- you're right. This is a scary new dependency. For a company full of PhD geniuses supposedly Doing No Evil, nobody at Google seems to understand how dangerous they are to the health of the web. In fact, I'd suggest they do, and they don't care- because they seem hell-bent on making everything on the web touch/use/rely upon Google in some way. This is no exception.

    A lot of folks don't even realize how Google is slowly weaning open-source projects into relying on them, too (with Google Summer of Code.)

    1. Re:dependence on Google is but one problem by richardtallent · · Score: 2, Insightful

      Oh no! If Google decides they don't want to spend the $10/year this will cost them anymore, I might have to change a header and footer script! Or *gasp* use a search-and-replace to fix the URLs!

      I'm *so* scared.

      Google is supporting web apps and offering to host the nasty boring bits that need strong caching. How very evil of them.

      And if Google is hacked, we're ALL screwed a hundred different ways. The average web developer *using* these libraries is more likely to have a vulnerable server than Google.

    2. Re:dependence on Google is but one problem by mckinnsb · · Score: 4, Informative
      Being a Javascript programmer myself, I was wondering which post to reply to. I guess this one suits. There are a lot of issues I'd like to tackle, here.

      Yeah, but what if Google decides that nobody is using these -- or they can't legally host them for whatever reason -- or they just decide that they don't want to do this anymore?

      Then you go back to including a script tag in your header of your HTML document. All of these frameworks are free. They will likely remain free even though some are sponsored (mooTools). The speed improvement exists, but is moderate-to-minimal, since a packed full-inclusion library of mooTools runs you about 32kb. That's 32kb the user wont need to download again and again, but its just 32kb.

      Think broader. What happens when: * Google decides to wrap more than just the promised functionality into it? For example, maybe "display a button" turns into "display a button and report usage stats"?

      Even if the code is compressed and obfuscated, this "wrapped functionality" would become *glaringly* obvious to any javascript programmer using Firebug. The news would most likely spread like wildfire. Especially on /. The only thing they could track without really being monitored are which IP addresses are requesting the mooTools.js (for example) file. They could measure its popularity, but not *necessarily* what sites they are visiting. Granted- I haven't looked at the API yet, but if its just a .js file hosted on a Google server, there isn't really too much they can monitor that they don't already. Analytics provides them with *tons* more information. To be honest, this just seems like a professional courtesy.

      There is a key point here I hope was visible - JavaScript is totally Load on Delivery, Executed Client Side. They can't really sneak much past you , and any efforts to do so would still remain visible in some way (you would see NET traffic).

      * Google gets hacked and malicious Javascript is included?

      Interesting, but I haven't seen Google hacked yet - not saying it can't happen, but I've not seen it. There is more of a chance of someone intercepting the expected .js file and then passing a different one- however, keep in mind that if you are doing *anything* that requires any level of security what so ever in JS, well, you have other, deeper fundamental problems.

      But, yes- you're right. This is a scary new dependency. For a company full of PhD geniuses supposedly Doing No Evil, nobody at Google seems to understand how dangerous they are to the health of the web. In fact, I'd suggest they do, and they don't care- because they seem hell-bent on making everything on the web touch/use/rely upon Google in some way. This is no exception. A lot of folks don't even realize how Google is slowly weaning open-source projects into relying on them, too (with Google Summer of Code.)

      It is a dependency, but its not that scary. Open source projects have always been, for better or worse, more or less reliant on outside momentum to keep them going. Joomla has conferences (that you have to pay to see), MySQL is powered by Sun, Ubuntu has pay-for-support. The fact that Google is willing to pay for kids to work on open source projects of their choosing (and granted, Google's selection), is not necessarily a form of control above and beyond the influence of capital. If I had millions of dollars, I would probably donate to open source projects myself - and they may be ones of my choosing - but I probably couldn't consider myself controlling them as much as helping them grow.

      This is really nothing more than a professional courtesy offered by Google. They are right - its dumb for everyone to download the same files over and over again.

      Furthermore, someone made a post earlier talking about JS programmers needing to learn how to use "modularity". We

    3. Re:dependence on Google is but one problem by Anonymous Coward · · Score: 0

      But, yes- you're right. This is a scary new dependency. God, enough already.

      This isn't scary, and it's not a dependency. If anything, it's a feature to support marketing. Your not dependent on anything, you don't like it? Don't link to it. You want to use it, fine, but no one is forcing you to. It's not scary, it's not a dependency, and if they changed "display a button" to "display a button and report usage stats" then people would be on to it and there would be hell to pay for Google, they obviously wouldn't want to drive people away from using it with things that like. It's more in their interest to just host the original files and keep track of which sites are sending visitors to which toolkits. Among other things, they can track which toolkits are the most popular.

      There are several useful things that can come from this before "oooooooh, let's inject some code and screw with people!" Just because that's a possibility doesn't mean it's remotely likely to happen. Google could also just decide one day that they want to replace all of the toolkits with exploit code to install malware, think of the instant money! But how likely is that?

      In fact, you know, what? Google could decide to start sending out official spam to all of their GMail users and harvesting their information, or they could decide to show a full-page ad before search results, or they could decide to make you watch an ad before every video on YouTube, or they could decide to turn Analytics into a popup-serving service, or they could.....

      but they don't, do they?

      Oh, and if the Google servers get hacked, then a bunch of Javascript libraries are the least of their worries.
    4. Re:dependence on Google is but one problem by caerwyn · · Score: 2, Insightful

      I'll take the benefits of Google supporting open source over "GSoC is evil" paranoia.

      If Google suddenly decides to stop hosting these, or touches them in some fashion, it's going to get discovered and fixed in well under 24 hours. Google hosting a file like this means that there are going to be a *lot* of eyes on the file.

      Google is, as it currently stands, far from "dangerous to the health of the web". Outside of using their webmail fairly heavily, I could avoid using google quite easily- as could any other web user. Many websites are more dependent on them due to Google being their source of income, but the fact that Google has effectively created a niche for small websites to live in can hardly be viewed as a negative.

      --
      The ringing of the division bell has begun... -PF
    5. Re:dependence on Google is but one problem by Anonymous Coward · · Score: 1, Insightful

      If Google decides they don't want to spend the $10/year this will cost them anymore, I might have to change a header and footer script! Or *gasp* use a search-and-replace to fix the URLs!

      OK, hypothetical situation it is. Google offlines the javascript. All of your customers websites break, some of them are medium to high profile webbusinesses. For the next two or three hours, they aren't receiving any orders. Their potential customers think "Oh well, this site is broken, I'll just buy it from the competitor whose website seems to work".

      Three hours have passed, and your customers suddenly realize there's something wrong with their website. They all call you in a timespan of 30 minutes. It takes you half an hour to find the problem, it takes you a couple of hours to fix all the sites. The business day is over.

      Some of your customers are happy you fixed their website, but most will angry at you because you trusted a third party website with their business and they've lost potential revenue from that. You've lost time, cost customers money and potentially have lost future business with those customers.

      I'm *so* scared.

      And yet you haven't even thought of SLAs and lawyers yet.

      Google is supporting web apps and offering to host the nasty boring bits that need strong caching. How very evil of them.

      Evil? No, not really. They've gotten publicity, some statistics, and a whole lot of people who are now depending on them while they've got a nice disclaimer somewhere waving most responsability.

    6. Re:dependence on Google is but one problem by Anonymous Coward · · Score: 0
      Just to be clear, I'm not richardtallent; onward:

      If Google decides they don't want to spend the $10/year this will cost them anymore, I might have to change a header and footer script! Or *gasp* use a search-and-replace to fix the URLs!

      OK, hypothetical situation it is. Google offlines the javascript. All of your customers websites break, some of them are medium to high profile webbusinesses. For the next two or three hours, they aren't receiving any orders. Their potential customers think "Oh well, this site is broken, I'll just buy it from the competitor whose website seems to work".

      Right, because if Google were to decide this effort wasn't worthwhile, they'd just pull the plug at some random time with no notice whatsoever. If they pull the plug because not enough people are using it, then not that many sites are affected; OTOH, if many people are using it, they piss off a bunch of web devs - not good PR. You didn't think this through from a business perspective (i.e. Google's perspective).

      Furthermore, why are the websites you design breaking because mootools, jQuery, or whatever is unavailable? Do you just hate those of us who turn off JS? I could understand a site having a less "marketable" appearance due to lack of JS, but it shouldn't "break" without it. In particular, why would you base crucial features like online ordering on external JS? Any JS required for payment processing should be hosted locally (and that's small JS anyway in my experience). Is this another example of you not thinking things through?

      Three hours have passed, and your customers suddenly realize there's something wrong with their website. They all call you in a timespan of 30 minutes. It takes you half an hour to find the problem, it takes you a couple of hours to fix all the sites. The business day is over.

      You asserted that at least some of the sites were "high profile", so odds are very good that one of those sites will notice the problem much sooner than 3 hours. And why does it take you half an hour to figure out that the root cause of a broken site (your assertion) is due to missing externally hosted JS files (again, assuming Google stopped hosting with zero notice)? And once you determine that Google has maliciously withdrawn the hosting (undoubtedly as part of some nefarious plan to besmirch your good name, or perhaps just out of spite), you know exactly which of your clients will be affected, because you have that documented, right? Of course, you had already considered the possibility that even Google might experience an outage or other problem, so you have a fallback plan already in place, right? Right!? You have the necessary (and up to date) JS files hosted locally just in case, and you also set up your sites so that redirecting the JS is a well-documented straightforward (and as automated as possible) process that doesn't take two hours, right? Indeed, since you have some "high profile" clients, presumably paying simiilarly high profile fees for your services, you actually test this failover plan on a regular basis, informing your clients of the results to give them additional assurance that you were a good choice to handle their business, right? Maybe you even have a set of running processes which monitor the availability of external resources, pro-actively switching to local resources when a problem is detected? Or maybe you're just taking their money and offering little in return. Maybe you didn't think this through either. Even if it did take you two hours to fix all the sites, you'd fix the highest profile sites first, right? That way your largest (and most profitable) clients would be least inconvenienced, right? Maybe you shouldn't be in charge of "high profile" web sites.

      Some of your customers are happy you fixed their website, but most will angry at you because you trusted a third party website with their business and they've lost potentia

    7. Re:dependence on Google is but one problem by skelly33 · · Score: 1

      ...not *necessarily* what sites they are visiting.

      They will see the sites being visited as referring domain in the HTTP request headers - they would be foolish NOT to capture this data. It would make them a pretty sweet little database of website, browser, and GeoIP-based popularity statistics.

    8. Re:dependence on Google is but one problem by idlemachine · · Score: 1

      A lot of folks don't even realize how Google is slowly weaning open-source projects into relying on them, too (with Google Summer of Code.)

      Yeah, it's such a shame they've taken all the attention away from the myriad of OSS mentoring programs that existed before SoC...

  18. Will be used, but not by you (or me) by Gandalf · · Score: 1

    What I would expect is that this will be useful for many people and that there is no drawback in using (yet another) Google service especially not if Adsense or Analytics already let Google track your visitors.

    If there are reasons for not to use it (privacy, control), you probably already know this of yourself because you have carefully picked where to host your site (possibly in-house) and/or partnered with a CDN (even if just S3) to optimise content delivery. Or you have an intranet application where there is hardly any advantage for this.

    Basically, you won't use this if you believe you know what you're doing, which you (yes, you) and me both do.

  19. Beware the overhead. by ClayJar · · Score: 5, Insightful

    Couldn't you design a modular AJAX system that would bring in functions as they are needed? That way, someone visiting just a couple pages wouldn't have to download the entire library. Have each function in it's own file, and then when an AJAX call is done, make it smart enough to figure out which functions need to be downloaded to run the resulting Javascript. Actually, the trend is in the opposite direction. By including everything in one file, you can greatly reduce the number of HTTP transactions. Eliminating the significant overhead there can improve "speed" tremendously.

    Additionally, if you're using compression, it is likely that one large file will compress more effectively than a collection of smaller files. (You *are* using compression, aren't you?)
    1. Re:Beware the overhead. by CastrTroy · · Score: 1

      But isn't the whole point of AJAX to reduce server load by having users do lots of little requests instead of a few large requests? While one large file would compress better than many small files, would one large file compress better than 1/10 of the data actually being sent out because the user didn't need the other 9/10 of the data? You could also optimize the fetching of code by sending a single request to request all the Javascript for a specific action in just one request. Which would contain a bigger section of code and be more easily compressible. My solution isn't finallized, and there could be some tweaking needed. However, there has to be a better solution than sending out your entire AJAX library to every user who visits your page.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    2. Re:Beware the overhead. by Anonymous Coward · · Score: 0

      Actually, some recent modifications to the ASP.net Ajax try to do just that kind of thing. The server consolidates all scripts into one big file before sending it to the client, limiting the number of connections required to download javascript files (which is usually blocking for page rendering). As you indicate, it also makes compression more efficient than compressing ten small files.

      In that sense, you get the benefit of separating your Javascript code for maintenance but still be efficient for download.
      But I guess you lose on the caching side when you use "generated" files so the gain might not be that good overall.

      One thing to remember is that user's tolerance for page loading is fairly small for a page they have never visited (once they are hooked it's better, but how many times have you opened 5 results from a google search and dismissed any that was not rendering fast enough ?). Since Javascript downloading is a bottleneck (usually only one connection is used to download Javascript, and it blocks rendering), anything that can speed it up is good. The best thing is if it already is on the client, as Google proposes.

      trade-offs, trade-offs...

  20. fuck that, i'd rather use sourceforge by Anonymous Coward · · Score: 0

    or someone else not trying to be not evil

  21. One of not so good about this .. by CALI-BANG · · Score: 1

    when sysadmin blocks google...

    your site won't be rendered properly.

    on our corporate network ... sysadmin blocks yahoo and other yahoo properties .. so sites that uses yahooapis.com are blocked also.

    i know you're not suppose to use companys internet connection --- but who else are workin that sometimes visit other sites? like slashdot

    1. Re:One of not so good about this .. by dyefade · · Score: 1

      Offtopic (ish): Why would a company want to block Yahoo on their network? Surely it's just another source of information. I can understand blocking Answers or Shopping or some specific property, but to block the WHOLE of something the size of Yahoo seems weird.

  22. Dojo libs are on AOL's edge network already by ggpauly · · Score: 1

    eg http://o.aolcdn.com/dojo/1.1.1/dojo/dojo.xd.js

    This is really fast - I think they cache on distributed servers. Much faster than from my own server.

    Anybody have more info on this? Is Google going to do something similar? Is AOL harvesting data on my clients' users?

    --
    Verbum caro factum est
  23. SSL warnings by Anonymous Coward · · Score: 0

    SSL might not like referencing remote libraries...

  24. Host it yourself, add meta-tag by Anonymous Coward · · Score: 3, Interesting

    A far better solution would be to add a meta-tag to a call, which the browser could check to see if it has it. For security reasons you need to define it always to use it, so if you don't define it, there will never be a mixup.

    Eg:

    script type="javascript" src="prototype.js" origin="http://www.prototype.com/version/1.6/" md5="..............."

    When another user want to use the same lib, he can the use the origin, and the browser will not download it from the new site. It's crucial to use the md5 (or other method), which the browser must calculate the first time it download it. Or else it would be easy to create a bogus file and get it run on another site.

    Of course this approach is only as secure as the hash.

  25. The web needs content addressable links! by Omnifarious · · Score: 1

    The web really needs some sort of link to a SHA-256 hash or something. If that kind of link were allowed ubiquitously it could solve the Slashdot effect and also make caching work really well for pictures, Ajax libraries and a whole number of other things that don't change that often.

    1. Re:The web needs content addressable links! by Omnifarious · · Score: 1

      I wish I could go back and my post...

      It would also solve stupid things like Netscape ceasing to host the DTDs for RSS.

  26. Probably a pretty cool idea by mlwmohawk · · Score: 1

    I know it is not obvious, but sites that are sensitive to bandwidth issues may find this a cost saving measure.
    Google, of course, gets even more information about everyone.

    win win, except for us privacy people. I guess we have to true "do no evil," huh?

  27. Re:Couldn't be... by Siquo · · Score: 0

    Ah, darnit, I forgot that allmighty Google is totally hackerproof by definition. My bad.

  28. Data Replication = BAD by y86 · · Score: 1

    It's really foolish to replicate these libraries all over the place.

    No one says you have to use google's service. It's just an idea. They eliminate library management problems for you and you give them a little data.

    So what. Do you think that COMCAST and other companies that are throttling bit torrent and high jacking DNS queries aren't mining and selling all your UNENCRYPTED CAN BE READ WITH NOTEPAD AND TCPDUMP HTTP get requests?

  29. How is privacy by Anonymous Coward · · Score: 0

    not related to the story?

    1. Re:How is privacy by joelwyland · · Score: 1

      You weren't worried about privacy concerns when you were fetching the javascript file from whatever random host that the website was referencing it from before.... I can't imagine you were pre-fetching all of your web pages and scanning where the external resources were referenced from before visiting the page... but somehow when that referenced source is Google then everyone is freaking out.

  30. Re:smart move by JavaStreet · · Score: 1

    Compared to all the other crappy media that sites tend to have these days, centralizing distribution of a bunch of Javascript libraries makes almost no sense. I doubt it would even appreciably reduce your bandwidth costs. Please! This is a great solution to reducing bandwidth costs whether they are monetary or just reducing the burden on your own servers. AOL already hosts AJAX libraries for this purpose. Although the AJAX libraries try to remain small, there size can be significant. Utilizing a fat piped resource to host these libraries? Smart move.
  31. what a piece of nonsense by Tom · · Score: 1

    Yeah, so it downloads some Ajax library twice, or even ten times, or a hundred. So what? The ads on your typical webpage are ten times as much in size and bandwidth.

    Thanks, but I prefer that my site works even if some other site I have nothing to do with is unreachable today. Granted, Google being unreachable is unlikely, but think about offline copies, internal applications, and all the other perfectly normal things that this approach suddenly turns into special cases.

    --
    Assorted stuff I do sometimes: Lemuria.org
    1. Re:what a piece of nonsense by thrillseeker · · Score: 1

      But that's the point - those ads are already mostly centrally hosted - i.e they were already using a few common sources - now the code libraries have a common source.

  32. All... by EddyPearson · · Score: 1

    ...your script are belong to us

    --
    You feel sleepy. Close your eyes. The opinions stated above are yours. You cannot imagine why you ever felt otherwise.
  33. Umm, no by holophrastic · · Score: 3, Interesting

    First, I block all google-related content, period. This type of thing would render many sites non-operational.

    Second, I've always had this complaint with the whole external javascript files. When you're already downloading a 50K html page, another 10K of javascript code in the same file inline downloads at full-speed. The external file requires yet another hit to the server, and everything involved therein. It almost never makes any sense. Even as a locally cached file, on a broadband connection, downloading the extra 10K is typically faster than opening and reading the locally cached file!

    But still, hosting a part of your corporate web-site with google simply breaches most of your confidentiality and non-disclosure agreements that you have with your clients and suppliers. It's that simple. Find the line that reads "shall not in any way disclose Confidential Information to any third party at any time, including consultants and contractors, copy and/or merge the Confidential Information/business relationship with any other technology, software or materials, except contractors with a specific need to know . . ."

    Simply put, if your Confidential client conversations go over gmail, you're in breach. If google tracks/monitors/sells/organizes/eases your business with your clients or suppliers, you're in breach -- i.e. it's illegal, and your own clients/suppliers can easily sue you for giving google their trade secrets.

    Obviously it's easier to out-source everything and do nothing. But there's a reason that google and other such companies offer these services for free -- it's free as in beer, at the definite cost of every other free; and it's often illegal for businesses.

    1. Re:Umm, no by _xeno_ · · Score: 1

      Second, I've always had this complaint with the whole external javascript files. When you're already downloading a 50K html page, another 10K of javascript code in the same file inline downloads at full-speed. The external file requires yet another hit to the server, and everything involved therein. It almost never makes any sense. Even as a locally cached file, on a broadband connection, downloading the extra 10K is typically faster than opening and reading the locally cached file!

      That's not the reason that I generally use external JavaScript files. The reason is code reuse, pure and simple. Generally speaking it's far easier to just link to the file (especially for static HTML pages) than it is to try and inline it. That way when you fix a bug that effects Internet Explorer 6.0.5201 on Windows XP SP1.5 or whatever you don't have to copy it to all your static files as the code is in a single location.

      Sure, you could use server-side includes, but then you need to make sure that your JavaScript code doesn't include "</script>" anywhere. The requirements are even more strict for (true) XHTML.

      It's also code separation. It separates the JavaScript code from the display, which generally makes it far easier to work with, especially with syntax-highlighting editors that get retarded when they see JavaScript in HTML.

      But anyway:

      The external file requires yet another hit to the server, and everything involved therein.

      Your web client sucks then. Get one that understands persistent HTTP connections. If you actually look at a network sniffer while any modern browser accesses a webpage you should see them all use the same socket.

      The other option is that the web server sucks or is configured not to use persistent HTTP connections. In any case, this shouldn't be a real problem.

      --
      You are in a maze of twisty little relative jumps, all alike.
    2. Re:Umm, no by element-o.p. · · Score: 1

      The external file requires yet another hit to the server, and everything involved therein. It almost never makes any sense.
      To the end user, you are right. However, from a web developer/programming standpoint, it actually does make sense. It is all about modular use of code -- when you write C/C++ programs, do you incorporate all of the code in-line, or do you reference standard libraries to handle some of the common functions? You use standard libraries of course, because it makes your code easier to maintain. If you need to update a function, you change it in one place (the external library) and voila! All of your code is "magically" updated (okay, technically, none of your code except that one external library was changed, but the point is that all of your code now uses that updated code, even though you only had to change one file).

      Web developers are using the same technology for the same reasons in their code. If you can create libraries of Javascript code, then you don't have to change umpteen-hundred files to update a function everywhere it's used on your site. You change one external library, and all of your web pages use the new, updated code rather than the old code. It causes a performance hit for the client, but in theory at least, it leads to portable, reliable code, the benefits of which outweigh the extra half-a-second it takes to reference the external file.
      --
      MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
    3. Re:Umm, no by richardtallent · · Score: 1

      So, don't put confidential information in your GET requests, and they won't be part of the referrer sent to Google. Duh.

    4. Re:Umm, no by opicak · · Score: 1

      You could sue google if they broke their pricacy agreement. If they don't, they cannot get any of your client's SECRETS from the e-mails.

    5. Re:Umm, no by Bogtha · · Score: 2, Interesting

      Second, I've always had this complaint with the whole external javascript files. When you're already downloading a 50K html page, another 10K of javascript code in the same file inline downloads at full-speed. The external file requires yet another hit to the server, and everything involved therein. It almost never makes any sense.

      It almost always makes sense. The external file only requires another hit to the server the first time you see it. From that point on, every page hit is smaller in size because you don't have to download the JavaScript again.

      Even as a locally cached file, on a broadband connection, downloading the extra 10K is typically faster than opening and reading the locally cached file!

      Downloading 10K is faster than loading 10K from disk? What are you using, floppies?

      Even if it is faster for you, it isn't faster for the website. Try magnifying that extra 10K for tens of thousands of visitors.

      But still, hosting a part of your corporate web-site with google simply breaches most of your confidentiality and non-disclosure agreements that you have with your clients and suppliers. It's that simple.

      If your contracts bar things like this, then they bar a hell of a lot. You can't use any external hosts. You can't use a CDN. You can't use most advertising on your website.

      Find the line that reads "shall not in any way disclose Confidential Information to any third party at any time

      And what confidential information do you think is being disclosed?

      --
      Bogtha Bogtha Bogtha
    6. Re:Umm, no by Anonymous Coward · · Score: 0

      Umm, no...

      It is not illegal. It is a breach of contract. Which are you legally allowed to do. You may, however, find that per the contract terms, there are penalties to pay. But it is not illegal.

    7. Re:Umm, no by Anonymous Coward · · Score: 0

      Your web client sucks then. Get one that understands persistent HTTP connections. If you actually look at a network sniffer while any modern browser accesses a webpage you should see them all use the same socket. So, your web client is able to ask for the JavaScript before it's loaded the page, huh? Otherwise your response is just moronic.

      I'm sure this is over your webmonkey head anyway, but not all of us are using fiber lines to connect to the web. Some of us are still stuck on, gasp, dial-up. And loading an external JavaScript file is STILL far slower than inlining it.

      See, here's how it works:

      1. Send request for the page.
      2. Read the page, sees it needs a JavaScript file.
      3. Sends request for the JavaScript file.
      4. Read the JavaScript file.
      5. Finally finish loading the page and let people interact with it.

      If you'd just inlined the script, you'd remove step 3 completely. And it matters on dial-up.

      As it turns out, web browsers can't preemptively request resources they don't know they need, and a request takes time EVEN IF YOU ALREADY ESTABLISHED THE CONNECTION.

      Inlining will ALWAYS be faster.
    8. Re:Umm, no by Anonymous Coward · · Score: 0

      I think you didn't read the last part of your own quote. " except contractors with a specific need to know . . ." would include a contractor providing you email services. Or should all IT service firms close up shop because we breach all contracts when our dirty, dirty fingers touch the delicate data?

    9. Re:Umm, no by holophrastic · · Score: 1

      persistent http connections save the trouble only of locating the server -- dns, ip, etc. BUt the external file is still another http request -- another entry in the server log, another server file request, etc. And, incidentally, the persistent socket connection wouldn't help if google hosted it, because it wouldn't be on the same server as the html page request. And many people put their external scripts into a subdomain, which also destroys the concept of the persistent socket.

      Incidentally, as far as code seperation goes, I haven't been in static html files for a really long time -- I'm working through a very in-depth backend platform for things a lot more complicated than code injection. Maintenance and seperation is handled in a very different manner. Kind of like with templates, where the code seperation isn't at the physical file level -- not even the logical file level.

    10. Re:Umm, no by Just+Some+Guy · · Score: 5, Informative

      Some of us are still stuck on, gasp, dial-up. And loading an external JavaScript file is STILL far slower than inlining it.

      Your grasp of the web sucks. Here's what happens on the second page you load on that site:

      1. Send request for the page.
      2. Read the page, sees it needs a JavaScript file.
      3. See that the JavaScript file was already cached locally.
      4. You're finished loading the page, so let people interact with it.

      I use maybe 20KB of JavaScript in parts of my site. Why tack an extra 20KB onto each and every pageload, meaning that each takes about another 4 seconds for someone on dialup? To satisfy the screwed-up sense of purity for some premature optimization fan who doesn't really understand the issues involved? No thanks. My site is optimized for real conditions.

      --
      Dewey, what part of this looks like authorities should be involved?
    11. Re:Umm, no by Onyma · · Score: 1
      I don't really get how this breaches confidentiality agreements. The most Google would see is a call from the client for the JS file in question. That's less information than if you are using Google Ads or even driving a call to Google Maps out of your site since I don't believe it contains referrer information as well. They could tell who is loading that file when but since no actual client data is being transferred there isn't much at risk.

      The external file requires yet another hit to the server, and everything involved therein. It almost never makes any sense. In a nutshell it reduces overall load on your server, it saves your clients on slower connections from re-downloading the same content over and over, and it allows you to do centralized code updates without having to remember every file that uses that routine. Myself I tend to use a combination of in-line and centralized code. Anything that gets used more than once goes in the common file and anything that is specific to one page goes inline on that page.

      Even as a locally cached file, on a broadband connection, downloading the extra 10K is typically faster than opening and reading the locally cached file! This part I really don't understand. When it is a disk based call it is faster than downloading however the difference becomes even greater once you consider that most of the time (outside initial load) the client is already going to be holding the page in its memory cache as well. Reading existing data from RAM is exponentially faster than pushing it through the network and re-parsing it each time.
      --
      Play me online? Well you know that I'll beat you. If I ever meet you I'll "/sbin/shutdown -h now" you. -Weird Al, kinda.
    12. Re:Umm, no by radish · · Score: 1

      When you're already downloading a 50K html page, another 10K of javascript code in the same file inline downloads at full-speed. The external file requires yet another hit to the server, and everything involved therein. It almost never makes any sense

      Ummm....let's say a visitor to my site views 30 different pages, all of which use the same ajax lib. Now in your case they're downloading that 10k 30 times (300k), rather than just once. Make sense now? Persistent connections are supported by all modern browsers/servers, and that fixes the whole setup/teardown expense. The only overhead is the actual latency of the HTTP GET and response, which is minimal.

      --

      ---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"

    13. Re:Umm, no by Anonymous Coward · · Score: 0

      No, you're wrong. That's not how it works.

      Step 3 is always "send a new request". Sometimes the response is "hasn't changed" - but the actual size of the request/response is about as large as the actual content! (Assuming, of course, that the libraries are compressed, which they usually are.)

      It's not the size that's a big deal, it's the latency in making the round-trip to the server.

      Inlining script isn't hard, either:

      SSI/ASP: <!--#include file="script.js"-->
      JSP: <%@include file="script.js"%>
      PHP: <?php include 'script.js'?>
      Perl: ... uh ... don't use Perl.

    14. Re:Umm, no by Just+Some+Guy · · Score: 4, Informative

      Step 3 is always "send a new request".

      Nope. You're flat-out, demonstrably wrong. Try watching an Apache log sometime. You see a visitor load a page, all its JavaScript, and all of its images. Then you see them load another page, and this time they only fetch the new HTML. There are no other GETs or HEADs - just the HTML.

      Inlining script isn't hard, either:

      Of course not. The issue is whether it's a good idea (it's not), not whether it's easy (it is).

      --
      Dewey, what part of this looks like authorities should be involved?
    15. Re:Umm, no by Anonymous Coward · · Score: 0

      Yeah, sorry, I don't have Apache server logs conveniently at my side.

      However, I do have this piece of software called a "web browser" and another called a "packet sniffer".

      Oh, hey, look, it DOES make a request for external JavaScript files EVERY SINGLE PAGE LOAD, just like I said it does! Sure, it gets a 304 response, but you've still got extra overhead and latency for NOTHING.

      And as someone else pointed out, it's faster to just pull it from the page than to load it from the cache in the first place.

    16. Re:Umm, no by Just+Some+Guy · · Score: 2, Informative

      However, I do have this piece of software called a "web browser" and another called a "packet sniffer".

      You have another one called "spyware", or perhaps "rootkit". Your experiment, conducted here on Ubuntu 8.04 with Wireshark 1.0.0, Firefox 3.0b5, and Konqueror 3.5.9, shows exactly the results I described and nothing resembling the results you invented to "prove" your point.

      Oh, hey, look, it DOES make a request for external JavaScript files EVERY SINGLE PAGE LOAD, just like I said it does! Sure, it gets a 304 response, but you've still got extra overhead and latency for NOTHING.

      304s would show up in my Apache logs, but they don't. Of course not! My browsers aren't making them.

      And as someone else pointed out, it's faster to just pull it from the page than to load it from the cache in the first place.

      As they incorrectly pointed out. Let's add some more facts to the discussion.

      First, this (almost never incurred) overhead is much smaller than inlining proponents want to claim:

      $ echo 'HEAD / HTTP/1.1\nHost: example.com\n\n' | nc -q1 house.example.com 80 | wc -c
      610

      Second, given an average HTML size of 20KB, an average JavaScript size of 20KB, and a 56K modem (which will get about 5KB/s on a good day), loading n pages will take:

      time(inline) = 40 * n / 5, or about 80 seconds for 10 pages
      time(external) = ((20 * n) + 20) / 5, or about 44 seconds for 10 pages
      time(external + fictional 304 overhead) = (((20 + .6) * n) + 20) / 5, or about 45.2 seconds per 10 pages

      Care to explain which part of that makes inline JavaScript faster, particularly for the dialup users y'all are claiming to save from the evils of external files?

      --
      Dewey, what part of this looks like authorities should be involved?
    17. Re:Umm, no by Onyma · · Score: 1

      Something that may be affecting the differing results you two are seeing is that the call to check if a file has been modified is browser and user settings dependent. This is most clearly demonstrated in IE's Temp Files settings where you can choose how frequently it checks for updates to cached files.

      --
      Play me online? Well you know that I'll beat you. If I ever meet you I'll "/sbin/shutdown -h now" you. -Weird Al, kinda.
    18. Re:Umm, no by Just+Some+Guy · · Score: 2, Insightful

      Something that may be affecting the differing results you two are seeing is that the call to check if a file has been modified is browser and user settings dependent.

      In fairness to AC, he may also be connecting to some ancient or broken server that doesn't support the "Cache-Control: max-age" or "Expires:" headers. If that's the case, or if he's running a noncompliant browser that improperly handles those, then it's possible that he's making a lot more requests than necessary.

      Either way, it's still a problem between his browser and that server, and not a problem with HTTP in general.

      --
      Dewey, what part of this looks like authorities should be involved?
    19. Re:Umm, no by Cl1mh4224rd · · Score: 1

      Even as a locally cached file, on a broadband connection, downloading the extra 10K is typically faster than opening and reading the locally cached file! Please explain to me how 1) downloading a file, 2) opening the file, and 3) reading the file is in any way faster than 1) opening the file and 2) reading the file.
      --
      People will pass up steak once a week, for crap every day.
    20. Re:Umm, no by Onyma · · Score: 1

      While I don't agree with the position in the initial post I will clarify it for you. What he's saying is it's faster to d/load the extra 10k embedded inside the HTML file (which you're going to have to open/read anyhow) than retrieving it as a separate file via the local cache and then opening that.

      --
      Play me online? Well you know that I'll beat you. If I ever meet you I'll "/sbin/shutdown -h now" you. -Weird Al, kinda.
    21. Re:Umm, no by Anonymous Coward · · Score: 0

      Look, I'm sorry, but you are wrong. What you are talking about is cache validation. It can happen. It does happen. It does not happen if the cached copy has not expired yet. Set proper Expires headers and you won't see 304s happen on every page load. You will see them when the resource expires.

      If you have set up a website correctly, and you still see 304s, it's because you've been screwing around with your browser settings and fucked up caching.

      If you don't believe me, read the RFCs, set up a server correctly, and use a clean install of your operating system so you know you haven't fucked your settings up. Crack out your packet sniffer then and tell us what you see.

      And as someone else pointed out, it's faster to just pull it from the page than to load it from the cache in the first place.

      That guy was a clueless fuckwit as well. You seriously - seriously - think that it is quicker to access data from a multi-user server halfway around the world than it is to pull it off a local disk?

    22. Re:Umm, no by holophrastic · · Score: 1

      That's amatuer web development at it's best. "Modular use of code" isn't an excuse to screw the end user. It's a technique to make your programming easier. You're supposed to "undo" it before sending it the the user.

      I build and manage enormous web projects, and of course I seperate my code in dozens of manners. But it's all put together again before benig pumped out.

      Look at it this way. You're the supreme master web developer guy. Are you asying that if some reasonable project actually requires that you not use external files (for some legitimate technical reason) that you simply won't be able to deal with it? Or will have to modify the way you work in order to do so?

      I've spent eon developing systems and platforms and techniques to ensure that my code seperation isn't done at the physical nor even the logical file level. My end-users never need to know. If it were up to me, I'd have embedded the page imagery into the same stream -- the way you can for e-mails -- in order to not only save the extra hit to the server, and all of teh stupid tracking to go with it, but also to actually cache everything on the page appropriately.

      But hey, that's me. I've never been one to stick with someone else's arbitrary solutions.

    23. Re:Umm, no by holophrastic · · Score: 1

      Lookup the word confidential, and realize that there are better words to use. Just the fact that you pulled it is confidential.

      Look at it this way. Your server's server-logs report when every page was generated, with IP address, and browser agent, and referrer and time and url. If even one thing on your page references something hosted at google, then you're effectively sending google your server logs, almost verbatim.

      My Server Log:
            2008-05-27 17:55:23 /index.html 167.192.28.25 live.com/search?super%20widgets (Mozilla compatible windows 98 whatever)

      Google Server Log:
            2008-05-27 17:55:25 /whatever.xml 167.192.28.25 mydomain.com/index.html (Mozilla compatible windows 98 whatever)

      That would be revealing my relationship with my end user to google. if that end user is actually my client, under an N.D.A., then that would be illegal.

      Not to mention, you just open up your end user to cross-domain issues by loading multiple domains on the same page, especially ones that you do not control.

    24. Re:Umm, no by holophrastic · · Score: 1

      Wow, that's not at all true, not even a little bit. First off, odds are that Google is not in your legal jurisdiction -- especially in the US, you're looking at one state and not another. Second, a web-site privary agreement has no actual legal merit -- it's not a legal document. Third, if money hasn't transferred hand, (i.e. you haven't paid google for the thing being used) then no contract covers anything, even an actual legal contract has to have money changing hands in association for 90% of the contract to be enforcable. Oh, and read their many many many privacy policies. Keep reading them until you see the line that reads something like "this policy can be retro-actively changed without notice". Continue reading to see that they already read your client's secrets in the e-mails. They already read them, they already aggregate them, they already analyze them, they already sell them, they already profit from them. Why do you think their services are free?

    25. Re:Umm, no by holophrastic · · Score: 1

      Good point about saving bandwidth on the server. It's kind of selfish, but yeah that's the real savings.

      AS for the N.D.A.'s, the whole point is to ban a hell of a lot. But there is a huge difference between hosting something at google, and using external hosts. Using an external host, under contract, results in a real business relations, which is subject to real laws. Your external host really can't use your data, in the same way as your patent lawyer can't steal your invention as he's patenting it for you.

      With google, since you're not paying for the service, they have no responsibility to you, and can and do sell your data for profit.

      What information? The fact, frequency, and details of how many people, their IP, and which pages they are accessing on my website. the hit to google gives them my page url as the referrer, virtually the identical time-stamp, the browser agent string, and my visitor's IP address.

    26. Re:Umm, no by holophrastic · · Score: 1

      (: yup, you are, of course, absolutely correct. It's not illegal in terms of government- or community-delivered penalties. I'd just wind up losing the client, a lot of money, my business, my home, and my dog.

    27. Re:Umm, no by holophrastic · · Score: 1

      When money changes hands, contracts are enforcible, there is an actual business relationship, and you can be held accountable. Many laws wind up automatically applying to you as a contractor-client relationship -- in both directions.

      But when you use a google product/service, first, you aren't paying for it. Which means that virtually no contract is enforcible. Second, there is no contract, and privacy policies on the web are merely theatrical performances, and google's not only says they can and do sell your data, but also say that they can be retro-actively altered without notice. Third, most of google's products and services are marked as beta releases, to say that they are "prone to errors, and use at your own risk" in concept. So you really have no recourse.

      If my IT contractor accidentally drops his hammer and destroys my server, at the very least I don't pay him for his work, and at most I can try to sue him for malicious destruction of property -- or at least argue that it wasn't an accident. If google's software "loses" my e-mail, I can do absolutely nothing.

    28. Re:Umm, no by holophrastic · · Score: 1

      I'll go backwards. . .

      Reading from the memory cache is faster, yes. But in surfing dozens of pages an hour, not everything stays in memory. And swap-file is not RAM. And even the RAM cache is usually of teh html, not the internally parsed version.

      Disk-based cached file is faster than downloading a 10K file, but not faster than downloading an additional 10K mid-stream. With no connection over-head, downloading 10K at full speed on a broadband connection is 1/100 of a second. The file-system isn't always that fast to locate a file. Standard game, try to copy one 500Mb file, and see that it takes a minute. Try to copy 500 1Mb files, and watch it take ten minutes. Finding and opening files can be really slow. And the problem gets worse when this becomes a principle and you've got three external files.

      As for code maintenance, you can have it seperated for development, but you shouldn't be forcing the user to suffer because you want to do less work. Package it up again so that the seperation doesn't make it all the way to the end user. What if that were an actual technical requirement of a weird project? Like for a legitimate reason? Would you not be able to do it? Would it be more work? It's not for me, I've got enough platforms and techniques to get around this issue without exposing the end user.

      Google also gets the referrer url, which would be the page on my domain. so they get the ip address of my visitor, the date/time stamp, the browser agent string, and the page they visited on my site. If my url's have decent names, then even more specific information can be gleaned.

    29. Re:Umm, no by holophrastic · · Score: 1

      certainly, you are selfishly saving server bandwidth, that's very true. but 10K on a broadband-conection mid-stream takes 0.01 seconds. 30 times that's 0.3 seconds across the entire 30-pageview session. The overhead of the http get is way more than that.

      As for persistent socket connections, it's not persistent when you're going across domains: obviously. And it's going to matter first-and-foremost on your home-page, the first page your visitor reaches, and the most important one for speed.

      Now, if your ISP would just spit it back as a reflex the way your spine does, now that would be different. You can easily mark content to be proxy cached that way, but most ISPs don't do taht anymore, and you'd still have the http overhead.

    30. Re:Umm, no by holophrastic · · Score: 1

      downloading 10K mid-stream is 0.01 seconds on a broadband connection.

      not everything that's downloaded is saved to a file, that would be silly.

      everything downloaded starts in your NIC's memory, is typically going to be moved over to system memory, and your browser will access it there, straight from memory. if your browser chooses to cache it as a file, that can happen in the background or even after the page is rendered.

      opening a file can be pretty slow. try this simple experiment. copy a 500Mb file, it'll take something like 1 minute. copy 500 1Mb files, watch it take 10 minutes. The file-system can be pretty slow. IN the old days, it was finding the file, traversing the hard drive, running through fragmentation, and opening file handles. Today, more efficient hardware and operating systems do that much faster, and then manage fast-find indecies, shadow copies, versioning, special flags, listing and folder updates, and events of all kinds, and fix fragmentation on-the-fly, and manage power consumption. Try it and see.

      But yeah, the real difference is that without the cached file, everything is in memory, not written to disk.

    31. Re:Umm, no by element-o.p. · · Score: 1
      From the Javascript I have written, I see three ways to create your web pages: 1) embed all of your Javascript into your code; 2) create external modules that all of your web pages reference as required; 3) a hybrid approach using some kind of development environment that allows you to write your Javascript code in a modular form, create your HTML separately with references to your Javascript modules, then, when you are done testing, writes the modular Javascript in-line, essentially "compiling" and "linking" your final HTML document before publishing it on a live web site.

      The first choice is great for simple sites, and in fact, is what I use most of the time, since I prefer to use Javascript for non-essential functions (because you can't always count on the end user having Javascript or other scripting languages enabled). Unfortunately, it makes for web projects -- especially large, complex web projects -- that are very difficult to maintain, since you are replicating code in every HTML document. Upgrades, therefore, must be replicated in every document. Given sufficient time, you *will* miss a document eventually, which can break things. That's bad juju, and if that's how you build your enormous projects, all I can say is I'm glad I don't have to maintain them.

      Option two is what you are griping about in your first post above. It makes your code much more maintainable -- you edit one file, and all of your pages are updated -- at the expense of an extra server hit and extra time to download.

      Option three is the best of both worlds at the cost of a little additional complexity...but nothing too bad. From what you said above..."I've spent eon developing systems and platforms and techniques to ensure that my code seperation isn't done at the physical nor even the logical file level..." it sounds like this might be the route you've taken. If so, then I retract my earlier comments. This is a good, scalable way to have the speed of in-line code along with the maintainability of external files. In essence, you are using external, modular code, but your end user never sees it; all they see is the in-line version of the document.

      If it were up to me, I'd have embedded the page imagery into the same stream -- the way you can for e-mails -- in order to not only save the extra hit to the server, and all of teh stupid tracking to go with it, but also to actually cache everything on the page appropriately.
      Just out of curiosity, if your web page is a CGI script, why couldn't you embed the images in your code then? I've used Perl CGI scripts to read an image file and print the raw GIF/JPG/PNG/whatever to the web browser; the associated HTML file used <img src="...blah.pl"> to call the CGI. I've never tried to create a CGI that combined the two portions into a single script, but I can't see why it wouldn't work.
      --
      MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
    32. Re:Umm, no by holophrastic · · Score: 1

      oh yes, a script that creates images, of course, all of the time. What I was saying is very different. When you send an e-mail, the single stream can have images embedded into it, and the your tag, has a src="cid:whatever" to reference the base64 or whatever encoded image elsewhere in the same file. Basically means that the entire web page nad images can travel as a single e-mail -- basically the images are attachments that you can reference in tags. I tried to do the same thing in a web page, but it turns out that I couldn't. I gave up before proving it one way or the other for certain.

    33. Re:Umm, no by Onyma · · Score: 1

      Reading from the memory cache is faster, yes. But in surfing dozens of pages an hour, not everything stays in memory. And swap-file is not RAM. And even the RAM cache is usually of teh html, not the internally parsed version.

      That's a skewed argument as outside of the initial page load a typical user would be repeatedly accessing your site during their period of interest and not be heading elsewhere mid session. The files in question would be recently cached with a high potential of being still in memory. Even if it had degraded to the disk cache it's still local and much quicker to read.

      Disk-based cached file is faster than downloading a 10K file, but not faster than downloading an additional 10K mid-stream. With no connection over-head, downloading 10K at full speed on a broadband connection is 1/100 of a second. The file-system isn't always that fast to locate a file. Standard game, try to copy one 500Mb file, and see that it takes a minute. Try to copy 500 1Mb files, and watch it take ten minutes. Finding and opening files can be really slow. And the problem gets worse when this becomes a principle and you've got three external files.

      The users you need to optimize for are specifically the ones on slower connections, not faster. 10kb of data in 1/100th of a second is a sustained rate of ~1 Mb/second, or about optimum at the highest level of service my Cable ISP offers. That's a fairly optimistic expectation of your average client's connection and of your server to be able to push out that level of traffic to multiple users at the same time. For a user on a typical 768kbit/s DSL connection that's more like 0.1s for that 10k of JS. Or 0.5s for 50k of JS. A web browser can find and read a file out of its cache in much less than 0.1s. And if the file was accessed only 30 seconds ago on a previous page load odds are it's sitting in RAM and not on disk. If the browser is set to check a file on every load then you have the network latency of the call to check the file however that is still well under 0.1s and especially the 0.5s for the theoretically larger file.

      For personal interest I just did up a small app that reads into memory 1000 random files out of my Firefox cache directory (a set of ~2500 files) The average time to locate and read a file into memory averages out to be about 0.012s per. I'm sure that in comparison that is quite slow to an actual browser considering this was a quickly kludged and non-optimized experiment.

      As for code maintenance, you can have it separated for development, but you shouldn't be forcing the user to suffer because you want to do less work. Package it up again so that the separation doesn't make it all the way to the end user. What if that were an actual technical requirement of a weird project? Like for a legitimate reason? Would you not be able to do it? Would it be more work? It's not for me, I've got enough platforms and techniques to get around this issue without exposing the end user.

      It's as simple as a server side include, in fact most of my pages are compentized and only assembled on request. The point of moving things like common JS and CSS externally is to allow the browser's cache to hold some of the data to save the client the overhead of retrieving it again across different page loads and some server bandwidth which will impact all clients visiting your site.

      You mentioned in another post about inlining image data. You can do that with data URLS on supported browsers (read: without work-arounds, anything that's not 5 >= IE <= 7). Since IE8 is finally re-adding native support for inline images it may well become more common in the future. So where is the tipping point? Would you inline 30k of images on every page load as well? 100k? 500k? I suspect the crux of the issue is in the size of the content involved. There comes a point when the additional drag on the client and server exceeds the benefits, especially on clients using slower connectio

      --
      Play me online? Well you know that I'll beat you. If I ever meet you I'll "/sbin/shutdown -h now" you. -Weird Al, kinda.
    34. Re:Umm, no by holophrastic · · Score: 1

      Glad to hear that inline images will be available in IE8. I guess it'll take another three years, and then I'll be able to count on them.

      As for how much I'd put there? It's not a matter of how much. If the page requires that content to make logical sense, then yes it goes in there. A little stupid image link in the sidebar doesn't need to be there. A picture of the product in the product catalogue does. It may be a 500K image, but that's the primary reason for the page. All that said, however, base64 is 33% larger than the binary original, so I'd have to weight things in general.

      Never would I say that there is absolutely no good time to use an external file. That's the whole never/always game. But I'm not overjoyed when I go to a corporate web-site, and they send my browser all over the world to retrieve bits of content and collect it myself. I simply don't want my browser to do that, and I don't want to trust what's happening on the other end. So I simply block my browser from doing so, and any web-site that doesn't serve the content itself, doens't get to serve me content. I wind up missing out on mostly ads, and the occasional youtube video of someone's cat.

      And as for my clients and suppliers, they are bound by our N.D.A., which clearly means that they cannot have our communications flow through google. Some find it frustrating, others respect me for it. All of them deal with it relatively reasonably.

    35. Re:Umm, no by opicak · · Score: 1

      Wow, that's not at all true, not even a little bit. First off, odds are that Google is not in your legal jurisdiction -- especially in the US, you're looking at one state and not another. Second, a web-site privary agreement has no actual legal merit -- it's not a legal document. Third, if money hasn't transferred hand, (i.e. you haven't paid google for the thing being used) then no contract covers anything, even an actual legal contract has to have money changing hands in association for 90% of the contract to be enforcable. You know far more about legal stuff than me (=nothing) and you're right. Legal crap in the US would be a reason for me to avoid doing my own business there ..

      Oh, and read their many many many privacy policies. Keep reading them until you see the line that reads something like "this policy can be retro-actively changed without notice". Continue reading to see that they already read your client's secrets in the e-mails. They already read them, they already aggregate them, they already analyze them, they already sell them, they already profit from them. Why do you think their services are free? They must process the messages to give you "relevant" ads and it's quite probable that they use the data for other stuff, like spam filter training, ... But there is important distinction between processing (automatic - no humans) of your anonymized messages and breaching your privacy, misusing concrete messages etc. Could you give some concrete example of the second case? Or are you just not OK with the 1st one ?
    36. Re:Umm, no by holophrastic · · Score: 1

      I disagree with you regarding the difference. The only difference between human eyes and non-human eyes is a primative sense of embarassment -- which is a human failure. It's the standard cameras in the airport bathrooms. No we don't want to know that they're there, but they'd better be there.

      You've said that google analyzes the e-mails to bring you sensitive ads. They then, of course, report to the advertizers -- gogole clients that often pay, as opposed to the visitors that are nothing ot google -- the stats and any possible bit of information that could possibly be concluded from the data.

      Google does a lot more than report basic frequency of ads. We're talking about e-mail conversations going on here. Things like: "13% of google users who search for children's toys are talking about your ferbie product at least once per week". Bingo, let's pump money into the ferbie, and not into the ewok. Or hey, forget the 13%, "more teenagers in your demographic are talking about this aspect of that product instead of that aspect of this product."

      That's an invasion of my privacy. Using my personal or professional conversations with friends, family, and clients to develop a very specific aggregate and then to sell that information to a company that will further profit from the knowledge.

      See, the problem from my experience is that people, such as yourself and most others, see "the aggregate" as nothing special; and for good reason, it never was. "The Aggregate" used to mean wide-sweeping statistical distributions and over-all data qualities. Things like "30% of teenagers smoke" and "mortgages tend to be paid off in 17 years". It's interesting industry marketing data, but it's not prophetic.

      These days, "The Aggregate" comes down to a really specific piece of information. When I aggregate your life with the lives of 40'000 others of your age in your city, big deal. But when I aggregate your life with 5'000 others of your age, your city, your personal preferences, your income, your hobbies, the age of your car, the model of your car, your current needs, your education, your family, and your general life-style, then I can tell a marketer, with pretty high certainty, what those 5'000 people, and you, are going to do/buy. Where the 40'000 were similar but different people that shared some basic demographic inforamtion, the 5'000 share everything and actually live incredibly similar lives.

      Statistically, that means the 5'000 are the same person. Which means that "the aggregate" is virtually identical to your non-aggregate information. So I'm saying that there is no difference between selling the aggregate, and selling your information directly.

    37. Re:Umm, no by Bogtha · · Score: 1

      Using an external host, under contract, results in a real business relations, which is subject to real laws.

      You don't need a written contract to have a real business relationship, and you don't need a real business relationship to be subject to real laws. Executing unauthorised code is illegal in many parts of the world. The fact that a written contract doesn't exist doesn't change that.

      With google, since you're not paying for the service, they have no responsibility to you, and can and do sell your data for profit.

      This has nothing whatsoever to do with payment and everything to do with terms of service. If your agreement with your host says they can use your data, then they can.

      What information? The fact, frequency, and details of how many people, their IP, and which pages they are accessing on my website. the hit to google gives them my page url as the referrer, virtually the identical time-stamp, the browser agent string, and my visitor's IP address.

      None of this is confidential information.

      --
      Bogtha Bogtha Bogtha
    38. Re:Umm, no by holophrastic · · Score: 1

      uh, yeah you do, yes it does, yes it is.

      You're subject to real laws no matter what you do, but "real laws" are noth the laws you're looking for. "real laws" stop criminal behaviour. Using your data without your permission isn't criminal. Without the written contract, they owe you nothing. And they can change their "terms of service" at any time, retroactively.

      And those terms of service are not a legal document and have absolutely no legal merit unless they are a part of a "paid" agreement. Without paying for it, it's not a legal contract, plain and simple.

      It's all confidential information, or it can be. Otherwise, welcome to data mining. We jump through hoops to ensure that when our visitors buy tickets to the city sex show, that you can't enter their e-mail address to find out if your boss has purchased tickets. Knowing what someone is doing with their money is, or can be, very confidential.

      Not to mention, why don't you call your credit card company, and ask to change something on your account. They'll ask for some security information. If you don't remember your birthdate, they'll fall back on "what are some of your recent purchases".

      Welcome to your world. Feel free to give your stuff away, but don't give away my stuff.

    39. Re:Umm, no by Bogtha · · Score: 1

      And those terms of service are not a legal document and have absolutely no legal merit unless they are a part of a "paid" agreement. Without paying for it, it's not a legal contract, plain and simple.

      I believe you are thinking of "consideration", and there doesn't have to be a payment in order for there to be consideration.

      Knowing what someone is doing with their money is, or can be, very confidential.

      And you think information like user-agent strings and timestamps are this sort of confidential information?

      --
      Bogtha Bogtha Bogtha
    40. Re:Umm, no by holophrastic · · Score: 1

      I think information like the ip, paired with all of those things is confidential information, because it amounts to your purchase history on every site that uses this google hosting. So, you're ready to hand over your entire purchase history going forward? Something as simple as which sites you purchase from, and anything that they encode into the url -- like the show for which you're purchasing tickets.

      And without paying for a contract -- I should say without something being exchanged in each direction -- you won't have anything to enforce. And besides, what are you arguing with? You think using a google "beta" product, you have some way of holding google accountable if it doesn't work? Or ensuring that they don't sell your data?

    41. Re:Umm, no by Bogtha · · Score: 1

      I think information like the ip, paired with all of those things is confidential information, because it amounts to your purchase history on every site that uses this google hosting.

      Huh? Your IP address etc amounts to your purchase history? How?

      Something as simple as which sites you purchase from, and anything that they encode into the url -- like the show for which you're purchasing tickets.

      URLs are not confidential. Any site that encodes confidential information into their URLs is quite simply broken. Proxy servers, outbound links, browser plugins... there's no end to the number of ways in which URLs can be disclosed.

      what are you arguing with?

      The idea that corporate websites can't use this because it discloses confidential information in breach of contracts.

      You think using a google "beta" product, you have some way of holding google accountable if it doesn't work?

      No. Where did I give the impression this was the case? Unless you have an SLA or similar, if it breaks, then you have no recourse. But that's got little to do with whether or not a written contract is in place or if any money is being paid - its quite routine for contracts to not specify the level of service provided, despite being paid for.

      Or ensuring that they don't sell your data?

      Selling things like IP addresses and user-agent strings? That isn't confidential information. You transmit it for each and every page you view.

      --
      Bogtha Bogtha Bogtha
    42. Re:Umm, no by holophrastic · · Score: 1

      Ok, either you're incredibly dense, or you're just playing with me. I'm going to believe the latter, so I'm going to give you the one concrete example to cover all of your above banter, and then I'm done. Take the last word and stop wasting my time.

      One of my clients does e-ticketing for consumer shows. URLs look something like buytickets.com/theAutoShow or buytickets.com/theSexShow2003. They are published in newspapers, and coupons, and everywhere, and hence are human legible. Although they could just as easily be buytickets.com/show?uid=56. Either way, the URL easily identifies the particular show, and is a public page.

      When you purchase a ticket, at some point, you wind up at a "hit print to print your tickets now" page. That url looks something like buytickets.com/tickets?customerid=....&passcode=.......&purchase=....... it's a link that's e-mailed to them, as well as a redirect from the purchase page. Yes it's usually all https.

      If either of these pages used a google-hosted script, the google would have the customer's IP address, know whether or not they actually made a pruchase (if both pages used the script), have the customer's id and passcode, and hence know exactly what was purchased, when the purchase took place, and the browser being used. Google would even know if the customer printed the page, since most browsers re-fetch content before printing.

      Now if buytickets.com were ticketmaster.com, now google would simply have the complete purchase history of everyone and everything on ticketmaster. And if it were also used on ticketking.com, then google could very well know every single purchase for on-line tickets to anything anywhere always. Now say amazon were to use it too.

      Now google simply sorts by ip address, and can see everything you've purchased on any of these sites. period.

      So, if I were google, I'd get to cross-reference for fun, and see that people tend to purchase tickets to sex shows within five hours of searching for children's toys, because they search for children and family things until their children go to bed and 2100, and then become raving adults after nine. And yes, that's already happened a couple of years ago, when aol 'accidentally' revealed their query log. And you'll remember that individuals could easily be identified from nothing more than their searches -- like "my dog has bladder issues in cleveland".

      So now, anyone searching for children's toys at eight, will be given ads for children's toys at eight, and at nine, the ads to those individuals will be for raving adults. And so any parent searching for children's toys will be presumed to be a raving adult after dark. It's not a giant leap to some of the more sinister accusations made over the last two years against completely innocent people who wind up using a word that sounds like it could be part of something else.

      Every contract is for some kind of product or service. It needn't be mentioned in whole, but it's definitely -- as in by definition -- for something. Without the money exchange, it has no legal weight. It's that simple. You can't argue anything for many reasons, not the least is that you can't prove when it happened, or taht it actually happened at all. Bank records are trustworthy.

      Once again, you can hold any ISP accountable for theft of your data, or reading/analyzing/selling it in any way. You can't hold google, in this case, accountable for anything, and they admit straight out to selling it.

      Not to mention, why should any other company profit from my hard-earned information without giving me a penny? YouTube sold for how many billion? And simply because of the existing content and user base. So do some quick division and tell me how much of that you deserved based on the content that you provided. And when it was sold to face-recognition software researchers, who then used it to produce and sell successful algorithms that they could not have produced without your family videos, what was your share?

      One

  34. Data vs. code. by ClayJar · · Score: 1

    The whole point of AJAX is to reduce the amount of data you need to send to the user, not necessarily to reduce the amount of code. Yes, the browser will need to download the entire library, but only once. Caching takes it from there.

    Compared to data, code is small. This is not a universal truth -- you can have a white pages site with a tremendously weighty interface that displays nothing but "Jenny 867-5309" -- but it is a valid assumption in the general case. With AJAX, data is effectively unbounded.

    If you're using AJAX just to make your collection of 42 casual haiku look pretty, that's one thing. If you're using AJAX more along the lines of Google Maps (where there is almost unfathomably more data than code), that's a horse of a different color. I imagine most people are somewhere in between, but it seems readily obvious that it would be incorrect to think of the AJAX designs in the present using the assumptions of the now distant past.

    1. Re:Data vs. code. by CastrTroy · · Score: 1

      If the code is so insignificant to the size of the data, then why is Google even taking on this project, and why do they think it's so important. Following your logic, having every user download 130K of javascript code is completely insignificant. So this whole exercise is a little pointless. If the size of the code doesn't matter, you might as well host the AJAX libraries yourself in one giant file, and require just have everybody download it.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    2. Re:Data vs. code. by windex82 · · Score: 1

      Its not about size its about latency.

          When a browser requests google.com/code.js then slashdot.org/code.js (assuming code.js are the same library of code) the browser will still need to request it from slashdot. org. However if slashdot's website indicated it needed the library from google.com/code.js the browser would inject the cached version instead. This way the file is already read and processed before the request to retrieve it would have even gotten to the remote server. Unfortunately, the only methods I can think of would require an even greater overhead. The next best solution would be to provide a handful of domains offing the same type of service instead of relaying solely on google..

    3. Re:Data vs. code. by Anonymous Coward · · Score: 0

      If the code is so insignificant to the size of the data, then why is Google even taking on this project

      Publicity (oh look, another slashdot article about google), data mining (what few data they'll get extra), and maybe (just maybe) for some obscure reason they're interested in making browser caching a little more efficient because I've been hearing a lot about the internet tubes being filled to the brim (although I can't fathom why a couple of javascript files would matter, unless I'm missing something in statistics).

      having every user download 130K of javascript code is completely insignificant. So this whole exercise is a little pointless.

      Actually, the 130K are insignificant compared to the regular data + HTML you used to transmit with every new page. Having said that, the whole point is kind of moot for a lot of applications which are sending URLs for images in json or (heavens forbid) xml which will then proceed to load those images. Really, html is usually a lot smaller than images.

      you might as well host the AJAX libraries yourself in one giant file, and require just have everybody download it.

      Which is what most people who want complete control will do. If you explain to your customer that his website has become dependent on a service of another website that it offers for free (and probably without any warranties) I think his first question would be "Why? Can I trust them? How much money will I lose if my site stops working because of them?".

      You'll probably start seeing blogging software like wordpress picking this up, and a few sites where each 1% of traffic they can shave off is a huge cut in costs.

      It's a good publicity move, a neat idea to shave another 70K of traffic of the tubes for each user x each site (which is negligable compared to all the flash video on the web these days), and I really don't know what they gain except for a very small amount of data they could mine. But at least we're talking about google again.

    4. Re:Data vs. code. by DragonWriter · · Score: 1

      If the code is so insignificant to the size of the data, then why is Google even taking on this project, and why do they think it's so important. Following your logic, having every user download 130K of javascript code is completely insignificant.


      Having every user download 130K of JavaScript code is probably a small startup hit when they hit your site, more than made up for by the improved user experience afterward for most sites with substantial interactivity.

      OTOH, its a lot better to have every user download that 130K of JavaScript code once per year, total, rather than the first time they hit any site that uses the library. What it means is that many users that hit your page will get all the benefit of that 130K of JavaScript code, without the initial, first-time, delay. (Plus, it means that users using your library where storage for cache may be more limited than on conventional computers, such as mobile devices, won't have as much chance of dropping the cached version of the library specific to your site before they return, and experiencing the delay again.)

  35. Extend the standard Javascript Library! by Anonymous Coward · · Score: 0

    Currently its either use a popular open source library which adds some extra bandwidth overhead or reinvent the wheel yourself.

  36. Isn't using javascript from multiple domains dumb? by Battalion · · Score: 1

    Isn't pulling javascript from different domains a fundamentally dumb idea? I disable javascript for everything, then enable on a per site basis if the javascript provides something useful to me. Pulling javascript from multiple domains makes it a pain in the backside having to find where all the javascript is coming from and enable javascript exection from that domain.

  37. Cross-Site Scripting by Definition by Rich · · Score: 3, Insightful

    Well, one effect of this would be to allow google to execute scripts in the security context of any site using their copy of the code. The same issue occurs for urchin.js etc. If your site needs to comply with regulations like PCI DSS or similar then you shouldn't be doing this as it means google has access to your cookies, can change your content etc. etc.

    For many common sites that aren't processing sensitive information however, sharing this code is probably a very good idea. Even better would be if google provided a signed version of the code so that you could see if it has been changed.

    1. Re:Cross-Site Scripting by Definition by richardtallent · · Score: 2, Informative

      These are static releases of library code written by others.

      Google would only be able to execute Javascript on your user's page if they modified the source code of the library you were loading from them. Which would be a BIG no-no.

      (Google does have a "loader" function available, but also just allows you to include the libraries via a traditional script tag to a static URL.)

      Otherwise, cookies are NOT cross-domain and wouldn't be passed with the HTTP request, unless you were silly enough to CNAME your "js.mysite.com" to "ajax.googleapis.com".

    2. Re:Cross-Site Scripting by Definition by Rich · · Score: 1

      I'm afraid you have no guarantee the code is unmodified - that's why I suggested it should be signed. You're also wrong about the cookies as they are accessible from javascript using document.cookie which means that any malicious script could access them (and even send them to a 3rd party). There is an HTTPOnly flag on cookies (an extension added in IE6sp1 but that flag has to be specifically set (see http://www.owasp.org/index.php/HTTPOnly for more details).

    3. Re:Cross-Site Scripting by Definition by Bogtha · · Score: 1

      Well, one effect of this would be to allow google to execute scripts in the security context of any site using their copy of the code. The same issue occurs for urchin.js etc.

      The difference between this and urchin, adsense, etc, is that the specific scripts you use are defined ahead of time. If they serve anything other than jQuery or whatever, then they are almost certainly in breach of many laws across the world, e.g. the Computer Misuse Act in the UK. When you reference jQuery on their systems, you aren't authorising them to execute anything else.

      --
      Bogtha Bogtha Bogtha
    4. Re:Cross-Site Scripting by Definition by richardtallent · · Score: 3, Insightful

      Do you *honestly* think that Google is going to modify the code for Prototype and slap some AdSense/Analytics goodies in there?

      The library developers would have their hide if they attempted such a thing!

      And I'm NOT wrong about cookies. Your site's cookies are not sent in the HTTP request, they would only be accessible via JavaScript--and again, without Google modifying the source code of these libraries to be malicious, they wouldn't be privy to those cookies.

      Not that cookies store anything useful these days... almost everyone with serious server-side code uses server-side persisted sessions, so the only cookie is the session ID.

    5. Re:Cross-Site Scripting by Definition by Rich · · Score: 1

      No, I don't think that google will maliciously modify this code but I do think it should be signed anyway. Signing it proves that the code is unmodified. Signing the code also prevents attacks like DNS cache poisoning which (unless google are offering to serve this code via HTTPS) mean that someone other than google can maliciously insert modified versions of the code. BTW if you think that big sites only store session IDs in cookies then you're not seeing the same crap I see every day from multinationals.

  38. Don't use "eval" in Javascript for input by Animats · · Score: 1

    This was a dumb feature in Javascript. In LISP, there's the "reader", which takes in a string and generates an S-expression, and there's "eval", which runs an S-expression through the interpreter. The "reader" is safe to run on hostile data, but "eval" is not. In Javascript, "eval" takes in a string and runs it as code. Not safe on hostile data.

    JSON is a huge security hole if read with "eval". Better libraries try to wrap "eval" with protective code that looks for "bad stuff" in the input. Some such libraries actually work. Maybe. The process of checking "JSON" input for "bad stuff" is complicated enough that just parsing the input without "eval" can be simpler.

    1. Re:Don't use "eval" in Javascript for input by JesseMcDonald · · Score: 1

      In LISP, there's the "reader", which takes in a string and generates an S-expression, and there's "eval", which runs an S-expression through the interpreter. The "reader" is safe to run on hostile data, but "eval" is not.

      That's not entirely true. In Common LISP, at least, you need to disable the #. reader macro (*read-eval*, I think) before you can read hostile data in relative safety. Normally the form following #. is passed to eval at read time; e.g. "#.(+ 2 3)" reads as the integer five, not a list.

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
  39. This is a great idea... by richardtallent · · Score: 1

    I asked Google to do this a long time ago:

    http://www.tallent.us/blog/?p=7

    This will enable web developers to support richer, cross-browser apps without the full "hit" of additional HTTP connections and bandwidth.

    Users gain the benefit of faster rendering on every site that uses these libraries--both due to proper caching, and because their browser can open more simultaneous HTTP connections.

    If Google goes down, change your header/footer scripts. BFD.

    In an age where Flash/Silverlight/etc. are supposed to be the "next big thing," I'm glad at least one company is not abandoning HTML-based apps.

  40. Dependency hell? by jmason · · Score: 3, Insightful

    One site covering this noted plans to 'stay up to date with the most recent bug fixes' of the hosted libraries -- this sounds like blindly upgrading the hosted libraries to new versions, which is a very bad idea.

    As a commenter there noted, it's a much better idea to use version-specific URIs, allowing users to choose the versions they wish to use -- otherwise version mismatches will occur between user apps and the Google-hosted libs, creating bugs and the classic 'dependency hell' that would be familiar to anyone who remembers the days of 'DLL hell'.

    1. Re:Dependency hell? by Spaceman40 · · Score: 2, Informative
      Read, and be enlightened:

      The versioning system allows your application to specify a desired version with as much precision as it needs. By dropping version fields, you end up wild carding a field. -- google.load() versioning
      --
      I [may] disapprove of what you say, but I will defend to the death your right to say it.
    2. Re:Dependency hell? by Anonymous Coward · · Score: 0

      You should read about the API before asserting something so stupid!

      The URLs are fully versioned. Google WILL NEVER modify any of these libraries without bumping the version, AND more importantly, Google doesn't and WILL NEVER muck with these libraries willy nilly. Google WILL ONLY accept new versions of the libraries when the stakeholders that collectively "own/manage" the libraries ask us too, AND we will only accept the mods IF the mods come with a new version number.

      You think we are a bunch of idots or something? That we would change the code out from under you without telling you? Why would we do something som amateurish and stupid? Plus, go look closely at a request/response. Pay special attention to the cache headers and you will note that IF you specify a fully qualified version, or if you use google.load() to load these APIs, your browser is given cache-forever semantics.

  41. Re:Couldn't be... by Anonymous Coward · · Score: 3, Insightful

    Single-point-of-failure, DNS-cache-poisoning, host-file-redirects, etc. etc.

    You are not thinking this through!

  42. There's less difference than you think by snowwrestler · · Score: 1

    We are not talking about the HTTP access logs of a site that I visit. We are talking about data shared with third parties for marketing purposes. This data does not materialize out of thin air; it requires my participation. So long as this is the case, I am well within my rights to decline to participate. To he who claims I used a red herring, please do explain what's wrong with that? The red herring is whether you're actually preventing any use of data. You're concerned that GA shares the data with Google as well as the site owner. But once your visit is logged at the server, the site owner can share that data with whoever the heck they feel like. The data in HTTP server logs are widely understand to be the property of the site owner and they are free to do whatever they want with them.

    The only difference is that it would not be obvious to you when it happens. If you think otherwise you're basically fooling yourself through obscurity.

    You're absolutely within your rights to decline to participate by blocking GA. Just don't think you're accomplishing anything of substance by doing so. If you really don't want your site access used for marketing, your only option is to not go to the site. You could use an anonymizing proxy to break the connection to you personally, but the use patterns would still be recorded.
    --
    Build a man a fire, he's warm for one night. Set him on fire, and he's warm for the rest of his life.
    1. Re:There's less difference than you think by IntlHarvester · · Score: 1

      But once your visit is logged at the server, the site owner can share that data with whoever the heck they feel like. The data in HTTP server logs ...

      Technically true, but as a practical matter it never happens.

      At least I've never heard of an advertising or analytics service that would accept (easily faked) HTTP logs and actually do something useful with them.

      --
      Business. Numbers. Money. People. Computer World.
  43. Glaring security hole? by Anonymous Coward · · Score: 0

    Hmm... I can see some security issues with this!

    Imagine:

    - Hacker creates homebrew prototype.js with malicious code and puts it somewhere on a server.
    - Hacker now proceeds to hack into an ISP's or company's DNS server, changing prototype.google.com or whatever it will be called to the desired IP.

    Voila, everyone visiting a site where the Google version of prototype.js is used will be loading the malicious code.

    Perhaps I am too paranoid about this but...

    1. Re:Glaring security hole? by richardtallent · · Score: 2, Interesting

      If someone could hack into the ISP's DNS server, it wouldn't matter where the fake code is being requested from.

      And, frankly, they could do a lot more dangerous (and easy pay-off) things than just redirect requests for a Javascript library--such as redirecting ebay, paypal, etc. to a phishing site.

  44. What is confidential about HTTP GET? by snowwrestler · · Score: 1

    But still, hosting a part of your corporate web-site with google simply breaches most of your confidentiality and non-disclosure agreements that you have with your clients and suppliers. It's that simple. Find the line that reads "shall not in any way disclose Confidential Information to any third party at any time, including consultants and contractors, copy and/or merge the Confidential Information/business relationship with any other technology, software or materials, except contractors with a specific need to know . . ." There is a legal definition of "confidential information" to be satisfied if one were to actually pursue a breach of contract. I do not see how HTTP GET requests could possibly satisfy that. Google would see only a requesting IP and what file was served (a standard UI library). This is not substantially different from what any intermediary on the public Internet would see as the packets passed through.

    If you and I have an NDA, and I place a call to you from my cell phone, the mere existence of that call does not constitute "confidential information" or a "trade secret." My cell company and your phone provider (at a minimum) would have logged the call, although not the contents. You're right that sending confidential information via Gmail may constitute breach, but by that standard, sending confidential information via ANY unencrypted e-mail may constitute breach since it traverses the public Internet, including both of your ISPs--where it may be subject to caching and deep inspection by spam filters. Simply put, only end-to-end encryption protects confidential information. If you have that, you can send the encrypted data any way you want.

    I applaud the desire to consider confidentiality and contractual obligations, but overreaching can be needlessly complex and costly. Reacting so strongly to ANY third party vendor--without consideration of the details--is sort of like "your computer is broadcasting its IP address!" It's true, but of no serious consequence.
    --
    Build a man a fire, he's warm for one night. Set him on fire, and he's warm for the rest of his life.
    1. Re:What is confidential about HTTP GET? by holophrastic · · Score: 1

      Google gets more than that. Google gets the time, date, and page url, not just the ui library, but also the url of the page on my domain. Which means that now google knows how many people are hitting my page, which pages on my site, and how many times the same guy comes back. yes that's valuable information, and it falls under confidential information in terms of identifiable business relationships -- if those visitors are actually clients of mine.

      And hey, these ui libraries will often be used in admin areas. that means google now knows when your product listings are updated. One of my clients does e-ticketing for shows, including adult shows. Now google knows who's buying tickets to adult shows, and when my client updates those shows, how often the reports are accessed, and the show organizer's access frequencies too.

      When I make a call on my mobile phone, my telecommunications carrier is bound by DOZENS of laws that disallow them from actually listening to the conversations and analyzing them in any content-oriented way. Google is not bound by any such laws, in part because you aren't paying them, so they aren't legally your provider.

    2. Re:What is confidential about HTTP GET? by snowwrestler · · Score: 1

      Google gets the time, date, and page url, not just the ui library, but also the url of the page on my domain. And this information does not pass through the public Internet already? When I posted this comment the time, date, page URL, and my IP address traversed through at least two third parties--my ISP and Slashdot's ISP--not to mention the public Internet in between. And it will be logged on Slashdot's server to do whatever they feel like with it.

      When I make a call on my mobile phone, my telecommunications carrier is bound by DOZENS of laws that disallow them from actually listening to the conversations and analyzing them in any content-oriented way. Google is not bound by any such laws, in part because you aren't paying them, so they aren't legally your provider. I'm not paying Slashdot anything. And you may not be paying the service provider on the other end of your call either. Besides, the issue is not whether the privacy of Google Analytics is worse than a phone call (I used that merely as an analogy), the question is whether it is any worse for end-user privacy than standard Web server logging. I don't see how it is. Google gets the paranoid spotlight because they are big and famous, but information like requesting IP, requested URL, time, date, etc can be seen and logged by numerous third parties during the course of normal Web surfing.
      --
      Build a man a fire, he's warm for one night. Set him on fire, and he's warm for the rest of his life.
    3. Re:What is confidential about HTTP GET? by holophrastic · · Score: 1

      You don't have to be paying the two ISPs to keep them from abusing the data. In your communication between you, your isp, 18 internet nodes, slashdot's isp, and slashdot, only you and slashdot are points of interest. every single isp in the middle is governed not by contract laws with you, but by telecommunications laws that prohibit them from doing anything with the content of your communication. slashdot is not, and you are not, but each of those isps and nodes is restricted by laws.

      google is not the same as the isps, google is not global infrastructure, google is not a telecommunications isp, google is subject to absolutely no such laws with regard to the content that passes through them.

      That's the problem.

    4. Re:What is confidential about HTTP GET? by snowwrestler · · Score: 1

      every single isp in the middle is governed not by contract laws with you, but by telecommunications laws that prohibit them from doing anything with the content of your communication. If you have citations for those laws I'd be interested to see them. My understanding is that the 1996 Telecomm Act applies common carrier protections to "telecommunications services," but not "information services." Internet trunks are categorized as the latter, which is the basis of the fight for "net neutrality."
      --
      Build a man a fire, he's warm for one night. Set him on fire, and he's warm for the rest of his life.
  45. Summary has tone of innovation by mattwarden · · Score: 1

    This isn't something Google came up with. It's great that they're doing it, but YUI did it quite a while ago. http://developer.yahoo.com/yui/articles/hosting/

    1. Re:Summary has tone of innovation by idlemachine · · Score: 1

      This isn't something Google came up with. It's great that they're doing it, but YUI did it quite a while ago. http://developer.yahoo.com/yui/articles/hosting/

      You don't think there's a difference between Yahoo providing access to their own AJAX libs and Google offering _versioned_ access to multiple open-source AJAX libs?

    2. Re:Summary has tone of innovation by mattwarden · · Score: 1

      I didn't say it was the same, and I didn't say it wasn't news. I objected to the implication that it was innovative to provide these libraries as a hosted solution to save bandwidth and download time. That's precisely what my comment said, by the way...

  46. How valuable is one data point per year? by JavaRob · · Score: 3, Insightful

    but now you also have the traffic pattern data for any of those sites that didn't use google analytics already, that's definitely valuable. No, they don't. Look again at how caching works. The first time a given browser hits a site that uses Prototype, for example, it'll pull the JS from Google (so Google sees that single site). The browser then hits 20 other sites that also use Prototype... and Google has no clue, because the JS is already cached.

    In fact, the cache headers specify that the JS libs don't expire for A YEAR, so Google will only see the first site you visit with X library Y version in an entire year.

    Is this information really that valuable?

    Mind you, this assumes you're hard-coding the google-hosted URLs to the JS libs, instead of using http://www.google.com/jsapi -- but that's a perfectly valid and supported approach.

    If you use their tools to wildcard the library version, etc. etc. then they get a ping each time that JSAPI script is loaded (again, no huge amount of info for them, but still you can decide whether you want the extra functionality or not).
  47. Sure, but this is *cached* content by JavaRob · · Score: 1

    The google-hosted JS libraries have headers that will only make your browser resolve & hit the server once a YEAR per library version.

    This is different from analytics and ad servers for that reason -- those are NEVER cached because they want every browser to hit them, every time.

  48. Network Caching Makes this Moot by jfmiller · · Score: 2, Interesting

    The whole idea of having a single URI for these very common .js files is that they can be cached, and not just on your local computer. Any router with the ability to follow the HTTP1.1 cache protocol would serve these pages out of a local cache.

    Moreover, if this idea catches on, WebBrowsers will begin shipping with these well know URIs preinstalled, perhaps even with optimized versions of the scripts that cut out all the IE6 cruft. What is really needed to make this work is a high bandwidth, high availability server that has enough name recognition to get them selves on slashdot. Google sounds like the right choice to me.

    If this works, in 5 years most of the requests for these URIs will never even leave your computer, and you cannot beat that kind of privacy.

    --
    Strive to make your client happy, not necessarly give them what they ask for
  49. Re:Couldn't be... by Anonymous Coward · · Score: 1, Funny

    Single-point-of-failure, DNS-cache-poisoning, host-file-redirects, etc. etc.

    XSS, SQL Injection, not escaping various characters, bad ideas, etc, etc

    We're all doomed!!!!!!! *yawn*

  50. I gotta ask.. by way2trivial · · Score: 1

    all SMTP passes in the open right?

    google or not-- emails pass through third parties all the time.

    --
    every day http://en.wikipedia.org/wiki/Special:Random
    1. Re:I gotta ask.. by holophrastic · · Score: 1

      And when you apply for a patent, your patent lawyer and your patent officer, and your patent advisor each see your invention before it's patented. Any one of them could steal it. Except that there are a dozen laws forbidding them from doing just that.

      SMTP doesn't pass in the open. It passes through authorized way-points. Your neighbour doesn't get your SMTP traffic, your ISP does. Your ISP is held by many many many laws and is prohibitted from analyzing the content of your communications, just like they can't listen to your telephone calls.

      That's not true of google, especially because you don't pay them, and especially because their products are listed as beta releases, and especially because they aren't in your state/country, and especially because their privacy policies, which are not legal documents, are retro-actively changable without notice.

  51. AOL, Yahoo CDNs -- now Google. So? by Iluvatar · · Score: 1

    Dojo is available on the AOL CDN for quite a while now... it's even the suggested way of using it, in the current manuals.

    Also, since Google is opening up its platform, makes sense to host popular AJAX toolkits for all to use -- why the big fuss? If you host your apps there, might as well use the common libraries -- if you don't want to, fine.

  52. Re:Couldn't be... by Anonymous Coward · · Score: 0

    And what does that have to do with opening yourself up to unnecessary risks despite Google having competent admins? Do you really want a Google outage to cause your site to become unusable, whether that is due to an outage at Google itself or caused by a problem on the way to Google, like the recent bogus route announcements? Do you want your website to be in the same boat when a single DNS poisoning makes millions of websites load trojaned AJAX libraries? As a user, do you want a single universal hosts entry to be able to subvert millions of websites? This is a massively bad idea, considering that you only save a split second load time once per visit.

  53. Re:Couldn't be... by joelwyland · · Score: 2, Insightful

    No one said they were hackerproof. However, how often do you hear about them getting hacked? They put a significant amount of energy into security.

  54. Bollocks. by Anonymous Coward · · Score: 0

    ...the site owner can share that data with whoever the heck they feel like.
    The site owner cannot share the data without explicitly stating they will be sharing the data in their privacy policy - unless they can convince you to download a file from the third party like GA.

  55. Client side caching? by Eponymous+Bastard · · Score: 1

    Wouldn't it make more sense to create a Firefox extension that preloads this and/or redirects pages to use your local copy of these libraries?

    It would be even easier with Google's hosting. Just hit them on startup, without referrer info, and then any site that links to Google's version is a little bit faster, and no privacy concerns exist.

    You could even have the extension check if the file is changed and pop up a warning that google is being evil :)

  56. Client-side tracking vs server side tracks by ruphus13 · · Score: 1

    There is valuable data that you can get from an analytics package, but not all analytics packages need to be invasive at the client-side. A ton of accurate info (including bot traffic) can be obtained from server-side packages like Webalizer and AWstats. These do not invade the user's privacy and give you an accurate idea of what is hitting your servers. That being said, it is not as easy to process the information just from the server side. However, best of all, these apps are free and Open Source!

    1. Re:Client-side tracking vs server side tracks by TheSunborn · · Score: 1

      AWStats is able to give you an idea about what hits your server, but it can't tell you anything about each user.

      Information such as "how many goes from PageA to PageB"
      How many users are leaving the website from this page and so on.

  57. No thanks by Orig_Club_Soda · · Score: 1

    Hosting files externally is a huge security risk and causes a warning/error pop up in the browser. No to mention that putting the page load time of your site in someone else's hands is also a risk.

  58. Nothing new by Sean · · Score: 1

    Yahoo does the same thing with it's YUI. It's optional. But careful, Yahoo (or Google in this case) can see all the referrer information since it's something you include *every* page, including generated ones. Google/Yahoo could be viewing parameters to your dynamic pages. Then again that's true of any site that displays third party advertising. http://noscript.net/ takes care of this problem in firefox.

  59. I think a real solution would be in order. by fuzzyfuzzyfungus · · Score: 1

    While I think google has identified a legitimate problem, comparatively large and widely used ajax libraries aren't going anywhere anytime soon, their proposed solution seems like a weak hack.
    Coming up with a real solution will require changes to the browser and/or the server, and it will take time and thought to get everything working and cover the edge cases; but the problem is hardly insurmountable.
    Ideally, we could add a little bit of extra, optional, data to the browser caching system, and markedly increase its ability to support reuse of what are basically libraries across domains. Off the cuff, I'd suggest hashing. The browser would take an MD5 or SHA1 of each object it is caching. When the browser hits a new page, the page could refer to http://urloffoolibrary.com/foo.js [SHA1 of foo.js] and, based on that, the browser could check to see if it already has foo.js(even if downloaded from http://foomirror.com./

    The other option, of course, would be to recognize that ajax stuff is basically growing its way toward equivalency with desktop apps, and bite the bullet of essentially adding package management to the browser cache. That would be rather heavierweight, and would present a number of possible issues; but might also allow a more elegant approach.

    1. Re:I think a real solution would be in order. by SanityInAnarchy · · Score: 1

      Off the cuff, I'd suggest hashing. The browser would take an MD5 or SHA1 of each object it is caching. I've had this idea for awhile. In fact, we already have something sort-of similar -- the etag, among other things.

      We can even do tricks like if-modified-since, to fetch a file if and only if it's been modified since our cached version was downloaded.

      What we want is something like that, but across URLs and servers. So you'd issue a HEAD request, look for headers like X-SHA1-Sum or X-MD5-Sum (probably support multiple such headers), and for each of those, check if we have an object cached by that sum.

      The advantage of this over Google is that we don't have to hit Google's servers every time -- we download it from whichever site we're connected to at the moment. Which is probably faster anyway, especially given pipelining, etc. That means less privacy concerns and less single points of failure -- but webmasters looking to save every penny can always link to Google's library anyway.

      The other option, of course, would be to recognize that ajax stuff is basically growing its way toward equivalency with desktop apps, and bite the bullet of essentially adding package management to the browser cache. I would actually go the other way: It might take a few extra features, but most of the time, I'd much rather have package management that behaves like a web browser. Instead of my package manager bugging me that there's a Firefox update, and then bugging me to restart my browser, I'd simply start whatever the latest Firefox is as soon as I click on it.

      But either way, I think the checksum idea will be trivial to implement all around, and I don't see a reason not to, even if we go the package management route in the long run.
      --
      Don't thank God, thank a doctor!
  60. Choices, choices... by bennomatic · · Score: 1

    You do have all the rights you're talking about. But if the biz model doesn't work for the provider, and they can find a way to exclude you for not accepting Google ads, or for not accepting images, or... well, pretty much anything else, there's no law that says they have to allow you to browse your way.

    Of course, if their content is compelling enough, either you'll accept their terms, negotiate new terms with them (i.e. pay for no-ad versions) or find a way to defeat their protection mechanisms. If it's the last option, they'll eventually figure it out and create yet another layer of protection.

    Heck, some sites will even refuse you if you don't use a particular version of IE. Blocking access to unprofitable visitors shouldn't be too difficult.

    --
    The CB App. What's your 20?
  61. Re:Couldn't be... by ProfessionalCookie · · Score: 1

    I design sites to that when Javascript fails the site still works. Same with CSS.

    I agree about DNS poisoning though. It's a pity that we haven't fixed DNS yet.

  62. Yeah well OK google does no evil, but what if... by w4rl5ck · · Score: 1

    they decide to do, and put some malicious code in the libraries? Or if one of the libraries somehow enables XSS attacks on google mail accounts or the like?

    I don't like it.

  63. bindun by grrowl · · Score: 2, Interesting

    One very important metric google analytics doesn't include is "Who doesn't have Javascript enabled?". Another thing to keep in mind: the whole "hosting scripts for global caching" thing was already done by Yahoo! with their YUI libraries, so keep in mind you should apply all your google-directed conspiracy hate at them as well.

  64. Misunderstanding the problem by DragonWriter · · Score: 1

    Compared to all the other crappy media that sites tend to have these days, centralizing distribution of a bunch of Javascript libraries makes almost no sense. I doubt it would even appreciably reduce your bandwidth costs.


    Uh, the problem isn't "bandwidth costs". The problem is user experience -- lots of sites use the same JavaScript libraries, but browsers cache based on URL. If a centralized repository for the JavaScript is used, the average load time of every page using the repository is reduced compared to if each site hosted the library locally.

    The idea isn't that every request for a library has to go through Google, the idea is that almost all requests for the libraries can hit the user's local cache and not hit the network at all. (Google, I suspect, will get more, though still rough, information about website popularity than information about individual browsing habits from this.)
  65. Browser cache telepathy? by DragonWriter · · Score: 1

    There is, of course, something of a privacy violation here, in that Google will now be able to keep track of which users are entering various non-Google Web pages.


    Really? Sure, they can tell which web page using the Google-hosted library a user hits first, if they care, but how are they going to tell which one's they hit later when the request for the library are satisfied by the user's local cache rather than resulting in any network request at all, which is the whole point here?
  66. Check the HTTP spec, indeed! by DragonWriter · · Score: 1

    Incorrect. A cached page STILL results in a hit to the server, the only difference is that the response is a "304 Not Modified" rather than "200 OK" with content. Check the HTTP spec sometime.


    Incorrect. Attempting to read a cached page may still result in a hit to the server, depending on the configuration of the browser. Most browser have a configurable setting as to when they will check for modified pages, and "on every access" or the equivalent is not, IME, usually the default setting, so, without an active decision by the user to do so, the browser will not hit the server on every request for a cached page, and most browsers are easily configured to never hit the server if a non-stale version of a resource is cached, though the usual default is somewhere in between the extremes.

    Check the HTTP spec sometime.


    The HTTP spec disagrees with your position, which lays out a position contrary to a major purpose of HTTP caching (RFC 2616, Sec. 13: "The goal of caching in HTTP/1.1 is to eliminate the need to send requests in many cases, and to eliminate the need to send full responses in many other cases." [emphasis added].) Under the requirements for cache correctness (Sec. 13.1.1 of RFC 2616), a correct cache need not send a request to the server if it has a cached version that is "fresh enough" as defined by the most restrictive of the requirements of the client, origin server, or the cache itself (for a client local cache, of course, the first and last of these should be the same), and indeed, under the spec, a cache that has a fresh-enough version available should return it even when it has no connectivity to the origin server.

    You seem to think that HTTP caching never reduces the number of requests sent, only the number of full responses returned. This position is not supported by the HTTP 1.1 specification (RFC 2616).

  67. wow.. that seems -- trusting by way2trivial · · Score: 1

    http://www.cert.org/homeusers/email_postcard.html

    there are, between my ISP and the destination ISP-- many many waypoints that a bored tech can use to copy all the packets moving through--

    --
    every day http://en.wikipedia.org/wiki/Special:Random
  68. Re:wow.. that seems -- trusting by holophrastic · · Score: 1

    And that bored tech would be performing an illegal activity. Plain and simple.

    Not to mention that my e-mail is sent via my e-mail server -- which is a web-server that I pay for and manage -- which then connects pretty-well directly to the destination e-mail server. The only way-points are my server as the source, and my client's server as the destination. So again we're left only with the actual node-to-node transmission through the ISP.

    It's not trusting. It's liability. I don't need to trust that the bored tech in your case isn't reading the e-mail. I need to know that if he does, and he does something with the information, it's illegal and probably criminal which means that I'm not liable for the damages to my client that may result.

    That's the same reason for the cameras and security alarm systems here. It's not to stop the burgler, who's wearing a mask anyway. It's to prove to the insurance company that someone did indeed break in and steal something, and that I'm not commiting insurrance fraud.

  69. Tracert by way2trivial · · Score: 1

    in windows (if you have it)
    type in tracert gmail.com

    EVERY computer/ip item listed-- takes your plaintext SMTP and passes it to the next item, and can keep a copy if they want to.

    you really think this is wholly different than keeping it in googles gmail server?

    --
    every day http://en.wikipedia.org/wiki/Special:Random
    1. Re:Tracert by holophrastic · · Score: 1

      yes it is. those computers along the trace are not random machines. they aren't my neighbours, and they aren't some random server somewhere. They are all ISPs and Internet infrastructure. And they are each subject to, here, the "Telecommunications Act" which makes it incredibly illegal to handle the content of the transmissions. Welcome to wire-tapping laws.

      Not to mention, again, that it's not about securing my communications. It's about dealing with liability. I have cameras at every entrance to my home. That doesn't help anyone catch the thief wearing a mask. It does, however, prove that I'm not commiting insurrance fraud when I say that something's been stolen.

      If my ISP steals information, and sells it, my client can't hold me responsible. But if google does, my client gets to blame me for giving it to them.

      I'm done here. Take the last word and I won't reply. You're either dense or toying with me. If you want to give away your private information, you're foolish. One day you'll put real money into a project, and find that you'd be able to achieve your dream if only you had a few million family photos. But you won't be able to afford to buy them, and you'll have been screwed out of an industry because populations decided that their content wasn't worth anything, and gave it to some random company for free, and that company simply wasn't yours. When youtube got sold for how many billions of dollars, how many of your home videos were sold with it? Did you get your shared of BILLIONS of dollars?

      Someone else, actually many others, are profitting from your information. This is not a garage sale where someone makes ten bucks. Dozens of companies are making billions and billions of dollars off of nothing more than the information that you are willingly providing. And you're getting nothing comparable in return.

      You can't possibly appreciate what it means to protect confidential information and maintain general privacy until you have confidential information to keep private. Just make sure that by the time that happens, you aren't in an open fields with no walls.