主页无法正常加载 [英] home page does not load normally

查看:123
本文介绍了主页无法正常加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在c#中有一个网站(在本地主机上运行进行测试),主页上也有一些java脚本。它工作正常,但是当我们加载默认主页时,它确实需要大约28秒到30秒。我已经使用java脚本和jqueries测试了这个主页,但需要大约。第一次请求加载或稍后刷新30秒。



就其他页面而言,它们正常加载。是否有人可以指出每次默认页面加载速度较慢的一些原因。并且还建议一些减少页面加载时间的技巧。



任何帮助都表示赞赏....

解决方案

< blockquote>很难说没有看到你的网站,但这里有一些提示:



唤醒asp应用程序池总是需要一些时间。用另一个浏览器重新访问后它是否也加载缓慢(或首先清理缓存)



限制使用精灵打开页面所需的操作数量( http://spriteme.org/ [ ^ ]



优化图像文件夹,保存静态内容,如图像和脚本。



确保所有div表和图像都使用正确的大小属性。如果大小不合逻辑,则需要时间重新计算和呈现页面。



尝试查看是否有使用过的jscript函数的ascync(非阻塞)版本。尝试使用回调并尝试在页面加载事件后运行它们。



最后提示您可以在chrome dev工具中检查页面上哪个部分需要花费最多的时间来加载。





有在线版本很多资源都在加速你的页面。他重新只是一个。 Google网站管理员工具部分也有一些不错的提示。



http://www.webdesignerdepot.com/2013/02/how-to-speed-up-your-website-load-times/ [<一个href =http://www.webdesignerdepot.com/2013/02/how-to-speed-up-your-website-load-times/target =_ blanktitle =New Window> ^

hi,

I have one website (running on local host for testing) in c# and also have some java scripts on home page. It works fine but when we load the default home page then it does take approximately 28 seconds to 30 seconds. I have tested this home page with out using java scripts and jqueries but it takes approx. 30 seconds to load on first request or refresh later.

As far as other pages are concerned, they are loading normally. Is there anyone who can point out some of the reasons for slower page loading of default page every time. And also suggest some tips to reduce page load timing.

Any help is appreciated....

解决方案

It is hard to say without seeing your website but here are some tips :

It always takes some time to wake up the asp application pool. Does it also load slow after revisiting it with another browser ( or clean you cache first)

Limit the number op sockets needed to open your page by using sprites (http://spriteme.org/[^]

Optimize your image folder where you keep static content like images and scripts.

Be sure all your divs tables and images use the proper size attributes. It takes time to recalculate and render a page if the sizing is not logical.

Try to see if there a ascync (non blocking) versions of your used jscript functions. Try to use call backs and try to run them after page-load event.

Last tip You can check in the chrome dev tool what part on your page takes the most time to load.


There are online a lot of resources dealing with speeding up your page. Here is just one. Google webmaster tool section also has some nice tips.

http://www.webdesignerdepot.com/2013/02/how-to-speed-up-your-website-load-times/[^]


这篇关于主页无法正常加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆