托管 Yui、Google 地图、JQuery - 监控网站使用情况的简单方法?

发布于 2024-07-12 01:41:39 字数 382 浏览 3 评论 0原文

Yahoo Javascript 库 (YUI)、JQuery 和 Google 地图都允许您使用以下格式引用它们的文件:

<script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>

这会从它们的服务器请求脚本,这也会将 HTTP 引用地址传递到它们的 Web 服务器。 雅虎等公司是否使用它来生成有关哪些网站获得哪些流量的统计数据? 或者这是一个阴谋论?

当然,他们的服务器大多数时候会比任何小公司购买的服务器快得多,因此使用脚本的托管版本更有意义。

The Yahoo Javascript library (YUI), JQuery and less so Google maps all allow you to reference their files using the following format:

<script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>

This does a request for the script from their servers, which will also pass to their web server the HTTP referrer. Do Yahoo etc. use this to produce statistics on which websites get what traffic? Or is this a conspiracy theory?

Of course their servers most of the time will be a lot faster than any small company would buy, so using the hosted version of the script makes more sense.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

世界等同你 2024-07-19 01:41:39

Chris,

我在雅虎的 YUI 团队工作。

我们仅在 yui.yahooapis.com 上托管 YUI; Google 在其 CDN 上托管 YUI 和许多其他库。 我可以从 Yahoo 方面告诉您,我们不会通过 CDN 监控 YUI 的网站使用情况。 我们确实跟踪 yui.yahooapis.com 使用量的总体增长情况,但我们不跟踪哪些网站正在产生流量。 您建议我们可以跟踪使用情况,这是正确的 - 我们在托管文​​档中尽可能清楚地声明,只有当我们这边生成的流量日志不代表隐私问题时,您才应该使用此类服务​​。你。

但总的来说,我并不认为库使用的 CDN 流量是任何事物的可靠衡量标准。 大多数 YUI 使用,即使在 Yahoo,也不使用 yui.yahooapis.com 或 Google 的等效项,我确信其他库也是如此。 即使网站在我们的服务器上使用 YUI,我们也不会获得从 Google Analytics 或 Yahoo Analytics 获得的全面流量数据,因为并非所有页面都会统一使用 YUI 或 CDN。

鉴于托管服务的优势(包括来自 Google 的 SSL 和来自 Yahoo 的 YUI 组合处理),我认为 CDN 对于大多数实施者来说是一个巨大的胜利,几乎没有什么缺点。

-埃里克

Chris,

I work on the YUI team at Yahoo.

We host only YUI on yui.yahooapis.com; Google hosts YUI and many other libraries on its CDN. I can tell you from the Yahoo side that we don't monitor site usage of YUI from our CDN. We do track general growth of yui.yahooapis.com usage, but we don't track which sites are generating traffic. You're right to suggest that we could track usage -- and we state as clearly as we can in our hosting docs that you should only use this kind of service if the traffic logs generated on our side don't represent a privacy concern for you.

In general, though, I don't regard CDN traffic for library usage to be a reliable measurement of anything. Most YUI usage, even at Yahoo, doesn't use yui.yahooapis.com or Google's equivalent, and I'm sure the same is true for other libraries. And even when a site is using YUI from our servers, we wouldn't have comprehensive traffic data of the kind you'd get from Google Analytics or Yahoo Analytics -- because not all pages would use YUI or the CDN uniformly.

Given the advantages of the hosted service -- including SSL from Google and YUI combo-handling from Yahoo -- I see the CDN as being a big win for most implementers, with little downside.

-Eric

花海 2024-07-19 01:41:39

当然,他们会生成统计数据 - 至少他们需要知道他们在托管这些脚本上花费了多少资源。 而且很高兴知道谁使用您的代码。

我不认为这是一件坏事。

使用托管版本更有意义,因为您的访问者在访问另一个站点后可能已经缓存了脚本。

Of course they produce statistics - at minimum they need to know how many resources they spend on hosting these scripts. And it's also nice to know who uses your code.

I don't think it's a bad thing.

And using a hosted version makes even more sense because your visitors might have the script already cached after visiting another site.

筑梦 2024-07-19 01:41:39

当然,他们可以轻松统计哪些网站使用 YUI 以及使用频率,以及 YUI API 的哪些部分更受欢迎(在小型网站中)。 然而,他们无法知道网站访问者到底用他们的库做了什么。

鉴于他们(谷歌和雅虎)索引了大量网页,如果他们分析索引,他们可以获得更精确的统计数据。 因此,如果您的站点是公开的,您就无法隐藏您正在使用 YUI。

这同样适用于 Google 地图和 jQuery。

Sure, they can easily have statistics about which sites use YUI and how often, and also which parts of YUI API are more populare (among small sites). However, they cannot know what exactly web site visitors do with their libs.

Given, that they (Google & Yahoo) index a lot of web pages, they can get an even more precise statistics if they analyze their indexes. So you cannot hide that you are using YUI if your site is public.

The same applies to Google maps and jQuery.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文