Extra calls to stats URLs?

23 views
Skip to first unread message

Paul Thomas

unread,
Sep 7, 2009, 6:33:51 AM9/7/09
to Google AJAX APIs
Hi

I'm currently trying out the google hosted versions of jQuery. It's
great to be able to use the libraries from google's servers, so
thanks.

I have noticed when I've been debugging my AJAX however that extra
calls appear to be being made to google's servers after the library
has already been downloaded. These URLs look like the following:

http://www.google.com/uds/stats?r0=el%7Cjquery&nc=1252319019940_15016

They come from an image that is being embedded into the DOM,
presumably by some google javascript.

What is the purpose of these extra calls? Is google monitoring sites
that use the hosted APIs? If so what data is being collected and what
is it being used for?

Jeff S (Google)

unread,
Sep 10, 2009, 9:22:27 PM9/10/09
to Google AJAX APIs
Hi Paul,

Good question! Because many loads of the libraries are cached, we
never see requests for them. In order to better estimate our traffic,
we use this request to inform us what has been loaded. Also, the
request happens asynchronously much after the page loads so that we
don’t slow down the application performance. These signals are used by
us for capacity planning purposes. We have expanded some of our
operations and grown our capacity. The signals we get from these logs
are directly responsible for our ability to meet the needs of the
community and help ensure global, low latency access to the system.
For example, when a new library is released, we tend to see a traffic
spike as we serve new and not yet cached versions of these libraries.
Without information on how often these libraries are being requested
from us, we have a more difficult time anticipating how large this
spike might be.

If you don’t want these requests to happen, you can include the
libraries directly instead of through the loader. The direct links
are all listed here:
http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries

Happy coding,

Jeff

kingofthelowend

unread,
Oct 8, 2009, 12:47:25 PM10/8/09
to Google AJAX APIs
Jeff,

Good explanation. Unfortunately, this is breaking our SSL pages
because even though the jQuery and SWFObject libraries are loading via
HTTPS, the 1x1 stats .gif is loading via HTTP. For now we can revert
to linking directly to the secure scripts, but this is an issue.
Also, it seems to only happen in the transition to a secure area from
an unsecure area.

Thanks,
Alex

Jeff S (Google)

unread,
Oct 9, 2009, 2:24:27 PM10/9/09
to Google AJAX APIs
Hi Alex,

Thank you for mentioning this. It sounds like this is a bug, so I'm
digging into this now. I think the correct behavior would be that if
the library is loaded over HTTPS then the image URL that we attempt to
fetch should be HTTPS as well. For now you can work around this by
pulling in the script directly. The URLs of the libraries are
documented on

http://code.google.com/apis/ajaxlibs/documentation/index.html#jquery
and
http://code.google.com/apis/ajaxlibs/documentation/index.html#swfobject

And you can load these over HTTPS instead at the URLs provided in the
"path" section of the documentation. Here are some examples:

https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js

Happy coding,

Jeff

Chad

unread,
Oct 9, 2009, 11:19:24 AM10/9/09
to Google AJAX APIs
You say:

"If you don’t want these requests to happen, you can include the
libraries directly instead of through the loader. The direct links
are all listed here:
http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries "

Yet, I don't see "search" available on that page. On our site
http://www.yinyanghouse.com/ the ajax search element is breaking our
ssl pages (the shopping cart checkout page). If the page before the
person checks out has the ajax search box on it, this graphic is
loaded and flags an error in firefox and opera (possibly other
browsers as well).

I need to know how to not have this 1 pixel graphic loaded to avoid
this issue (or to get it loaded via https).

A brief code sample would be most appreciated....

Jeff S (Google)

unread,
Oct 9, 2009, 4:55:58 PM10/9/09
to Google AJAX APIs
Hi Chad,

The search control does require some of the features present in the
Ajax loader, so I don't think there is an easy workaround. I'll keep
you posted with what I find later today.

Thank you,

Jeff

On Oct 9, 8:19 am, Chad <chad.dup...@gmail.com> wrote:
> You say:
>
> "If you don’t want these requests to happen, you can include the
> libraries directly instead of through the loader.  The direct links
> are all listed here:http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries"
>
> Yet, I don't see "search" available on that page.  On our sitehttp://www.yinyanghouse.com/the ajax search element is breaking our

Jeff S (Google)

unread,
Oct 9, 2009, 5:21:17 PM10/9/09
to Google AJAX APIs
Hi Chad,

I've tried to reproduce this behavior and have as of yet been unable
to. If the Ajax loader is added to the page using an HTTPS URL, then
the call to add the stats image should not be attempted. Are you
including the common loader using:

https://www.google.com/jsapi

If so, could I see your application to try to reproduce?

Thank you,

Jeff

On Oct 9, 1:55 pm, "Jeff S (Google)" <j...@google.com> wrote:
> Hi Chad,
>
> The search control does require some of the features present in the
> Ajax loader, so I don't think there is an easy workaround. I'll keep
> you posted with what I find later today.
>
> Thank you,
>
> Jeff
>
> On Oct 9, 8:19 am, Chad <chad.dup...@gmail.com> wrote:
>
> > You say:
>
> > "If you don’t want these requests to happen, you can include the
> > libraries directly instead of through the loader.  The direct links
> > are all listed here:http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries"
>
> > Yet, I don't see "search" available on that page.  On our sitehttp://www.yinyanghouse.com/theajax search element is breaking our

Chad

unread,
Oct 9, 2009, 5:23:00 PM10/9/09
to Google AJAX APIs
Just an update. We've changed the script call to https://...jsapi
(instead of http://...) on all pages and this appears to have resolved
the issue in all browsers except the latest version of opera for some
reason we've yet to figure out. I would rather not have all calls
being https but as this problem happens when going from a http page
(with the ajax search) to a https page (without the ajax search) it's
the best we can do right now...

Thanks for taking the time to look into this issue.

-Chad.


On Oct 9, 4:55 pm, "Jeff S (Google)" <j...@google.com> wrote:
> Hi Chad,
>
> The search control does require some of the features present in the
> Ajax loader, so I don't think there is an easy workaround. I'll keep
> you posted with what I find later today.
>
> Thank you,
>
> Jeff
>
> On Oct 9, 8:19 am, Chad <chad.dup...@gmail.com> wrote:
>
> > You say:
>
> > "If you don’t want these requests to happen, you can include the
> > libraries directly instead of through the loader.  The direct links
> > are all listed here:http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries"
>
> > Yet, I don't see "search" available on that page.  On our sitehttp://www.yinyanghouse.com/theajax search element is breaking our
Reply all
Reply to author
Forward
0 new messages