English 中文(简体)
如果要求被搁置起来,是否减少网上申请的数量?
原标题:Does reducing the number of http requests matter if they are cached?

我的网站有大约10份参考的CSS和Java(JS)文件,因此我可以合并,只有2份CSS和JS文件供网络浏览者下载。 合并档案将减少吉大港山区的申请数量,减少页数。

我的问题是:如果这10个特别安全局和联合材料档案在第一页的负荷之后被搁置,那么第二页的负荷时间是否与只有2个特别安全局和联合材料档案的网页一样快? 我想这样说,因为单列档案不需要吉大港山区的请求。 我的理解是,有一些指挥文字可以自动地将安保科和联合材料档案合并用于部署,但这样做会使今后可能在网站上工作的初级专业人员/网络设计者复杂化。 该网站是一个慈善组织,很少有控制和可用的人力资源来检查和检查事情。

Update: My assumptions that using a cached file do not require an HTTP is wrong.

最佳回答

Yes, you should reduce number of requests even if resources are cached. Two reasons:

<>strong1> 即使在有线索的文件上也只打了很小的性能(每份档案)。

If you profile your website, you will see that for every resource there is still a roundtrip being made to the server. If the resource has not been updated the server will return HTTP status code 304 - Not Modified, otherwise it will return HTTP status code 200 (and the resource itself).

这里,通过对Stack多流回页的CSS文档进行抽样调查:

“entergraph

As you can see, even though the CSS file is cached, a request was made to make sure the cached version is up to date.

<>strong>2:第一次访问者也将受益于这一优化。

它将提高首次来访者以及有分管切身的人的页速。

问题回答

Yes you should, browsers will get content size to determine whether the file has been changed or not. So no matter if browser already cached it ,it will always send http requests.

事实是,一旦文件装上并注明日期,就会有多少份卷宗和小 j被分开,速度就会相同。

Of course, every time a user clears their cache the 10 files will be served again, thus causing more http requests.

In general, it s better to have as few files to server as possible, especially when your site is visited by a large number of users. Whenever you can save on http requests you should.





相关问题
Prevent IE caching

I am developing a Java EE web application using Struts. The problem is with Internet Explorer caching. If an user logs out he can access some pages because they are cached and no request is made. If I ...

Explanation for expires header

I have a joomla application working on Apache.To improve site performace we have written a .htaccess file to root of the application with setting a far future expires header to all the static content. ...

How does SO s form remember previous input values?

I ve noticed that the Title or Body part is remembered if I come back to the Ask Question page by pressing Back button of my browser. This feature is available in all browsers I tested, but doesn t ...

Why do firefox/chrome show a different page than IE8?

When I look at this published Google Docs document, I see the latest version with Firefox and Chrome, but an older version with IE8. Also, screen-scraping it via PHP/Curl gives me an older version. ...

Stop browser from filling textboxes with details

I ve run into a really annoying problem, and I m hoping it s just a setting I ve missed. I ve got an ASP.NET application which allows users to enter their username/password in various places (e.g. ...

Google App Engine: localhost browser caching?

I m developing with GAE on my own machine. It was pretty fast, until I added CSS and images, at which point the page loads much more slowly. I suspect that the browser isn t caching anything, perhaps ...

ASP.NET MVC 2 RC Caching Problem

Since upgrading from mvc 2 beta 2 to rc I m having trouble with an ajax submission in Internet Explorer. Upon carrying out a jquery form post, the function returns a url to a controller action. This ...

热门标签