English 中文(简体)
服务器的紧张程度如何? [闭门]
原标题:How much of a strain on servers is jQuery? [closed]
Closed. This question is off-topic. It is not currently accepting answers.

更新问题 因此,在Stack Overflow的

Closed 11 years ago.

然而,我只字不提,但可以注意到涉及它的许多问题。 在阅读基本内容时,,提到了“用户电脑上的限制,并可能属于你的网络服务器,如果你打算把JQuery书放在自己的网络服务器上”。

我对客户方面并不感到非常关切,但想知道我们会考虑什么样的压力。 1 http://en.wikipedia.org/wiki/JQuery#Including_the_library” rel=“nofollow”>read:jQuery图书馆“可以通过链接到当地拷贝或从公共服务器获得的许多拷贝中之一而列入网页”。 我想知道,为什么微软(或是谁)想要数百万人使用其服务器去达格·哈马舍尔德图书馆? 客户DL每届会一次存档,或者在事件/影响/功能火灾时仅需要DL d和在当地查阅的部分? 图书馆常常是pur开客户方? 如果说我的网站有100 000名访客和1 000 000人点击,图书馆档案有多少次是DL d? 每届会议一次? 处理这个N00b问题,但我看着一些相互矛盾的东西,并想知道有人能否填满我。

最佳回答

The jQuery framework, as is the case with any other client side script or style sheet, is stored (cached) on the client once downloaded.

The latest version of jQuery is about 31kb when minified for production, so this is in line with any other image or lightweight html page in your application except for the fact that it will be cached on the client and not downloaded twice.

允许像谷歌这样的一个CDN的 j基也是一种选择。 这里是一个伟大的博客站,负责这项工作。

问题回答

大部分静态内容,如Javascript档案中的jQuery图书馆,并不是一种紧张。 你们提到100克访客,是每天? 每个月? 真正改变期望。

You don t have to host the jQuery files on your servers anyway, you can use Google s Content Delivery Network (CDN) or Microsoft s CDN (like https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js) in order to eliminate any issues on your servers whatsoever related to just the downloading of the file.

There are a number of things you can do to mitigate these issues.

  1. you would want to make sure that the browser cached which ever javascript libraries you use. Browsers typically do this, and you can really enforce it with the html5 cache manifest. That way, each client only loads your code once.

  2. 尽可能减少你的rc。

  3. • 没收你的网络服务器,以保存共同的静态资源(如你的弧代码和图像),并将之用于缩小下载规模。

另外,还有一份名为的能力规划。 如果您的申请要接待100克来访者,你需要配备这些硬件来支持。

The file would be downloaded once per user. Once it s downloaded the first time, the user s browser caches it, and it s never downloaded again. Compare this to your HTML pages, which will be reloaded every single time the user clicks a link.

在33kb,JQuery的大小与一个大型的超文本文件相同,其数量比大多数图像少很多。 由于它只是一个静态档案,它基本上没有服务器负荷。 根据,第条,通用服务器软件可处理几十万份静态要求per second,而大多数网站必须处理。

That s why Google and Microsoft are okay with hosting jQuery for everybody - it s so small, it doesn t bother their servers much.

简言之,不担心。 j 贵格永远不会给你的服务器造成问题。





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签