从 IIS 并行加载 css 文件
我在普通 PC 上的 IIS 上遇到问题。
当从 IIS 加载具有超过 20 个 css 和 JS 的网站时,并非所有文件都会加载。我必须重新加载页面(以便从缓存中获取第一个 CSS 和 JS),然后加载其余部分。
任何想法,可能是什么原因? 以及我该如何解决它!
i have got a problem on an IIS on a normal PC.
When loading an website from that IIS with more than 20 css and JS,not all files are loaded. I have to reload the page (so that the first CSS and JS are got from cache), and then it loads the rest.
Any ideas, what could be the reason?
And how i can solve it!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
造成这种情况的可能原因有很多,包括机器速度慢、连接速度慢或文件太大。
Fiddler 对于缩小瓶颈范围非常有帮助。
在某些情况下,它是一个非常大的 js 文件,您可以使用各种工具将其最小化,包括 这个 来自 Microsoft。
如果机器很旧或没有太多内存,您可能会考虑更新硬件或移动到托管服务器。如果连接速度慢,同样适用。
There are a number of possible causes for this, including a slow machine, a slow connection, or very large files.
Fiddler is extremely helpful in helping to narrow down where the bottleneck may be.
In some cases, it is a very large js file, which you can minimize using various tools, including this one from Microsoft.
If the machine is old or doesn't have much memory, you might consider updating the hardware or moving to a hosted server. The same applies if the connection is slow.