简体   繁体   English

页面加载时css和js的最小和最大加载

[英]min and max loading of css and js on page load

My company has its own sales crm they have minimum of 300 web pages, can some on suggest on 我的公司有自己的销售crm,他们至少有300个网页,可以提供一些建议

1) Number of css and js files to be loaded on pageload. 1)要在页面加载时加载的css和js文件的数量。 2) Max number of http request for page load. 2)页面加载的最大http请求数。 3) Size of index page. 3)索引页面的大小。 4) User wait time for first time. 4)用户第一次等待时间。

Thank You http://www.momeen.com 谢谢http://www.momeen.com

It all depends on what you think your users will put up with. 这一切都取决于您认为您的用户会想到什么。 Different user groups for different web sites all have wildly varying expectations. 不同网站的不同用户群的期望值各不相同。

As a general guide I would say that after 4 seconds your users will get impatient, after 10 seconds they'll probably give up. 作为一般指南,我会说4秒后你的用户会感到不耐烦,10秒后他们可能会放弃。

Once you've worked out what you've considered acceptable, you will be able to come up with some answers for your first 3 questions. 一旦你找到了你认为可以接受的东西,你就可以为前3个问题找到答案。 If it's too slow, reduce the number of css/js files, or spread them across different domains (or use a CDN), or combine and minify them. 如果它太慢,减少css / js文件的数量,或将它们分布在不同的域(或使用CDN),或者将它们组合并缩小。 There are no definitive answers for your question. 您的问题没有明确的答案。

Number of css and js files to be loaded on pageload.? 要在pageload上加载的css和js文件数。

There is no limit on it.You can add up as many as you like. 它没有限制。你可以加入任意多个。 But its better if you use less css/js files because it accounts for your total loading time. 但是如果你使用较少的css / js文件会更好,因为它占你的总加载时间。 There are plenty of techniques that you can follow to save up those extra kbs. 你可以遵循很多技巧来节省额外的kbs。 Refer this: Tips to save up our page load time 请参阅: 保存页面加载时间的提示

 2) Max number of http request for page load.

No limit. 没有限制。 But as the number of requests required to load a page grows, the time taken for the page to be rendered increases. 但随着加载页面所需的请求数量的增加,页面呈现所花费的时间也会增加。

3) Size of index page & 4) User wait time for first time. 3)索引页面的大小&4)第一次的用户等待时间。

Size of index page --the minimum size possible without affecting the performance of page. 索引页面的大小 - 可能的最小大小而不影响页面的性能。

User wait time for first time-- < 4 seconds 用户第一次等待时间 - <4秒

Is there a maximum size that web pages should be kept under? 是否应该保留网页的最大大小?

Always remember,Less is more 永远记住,少即是多

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM