admin管理员组文章数量:1022964
I know this is a long shot, so I'm not counting on an answer, but I just for the life of me can't figure out why this web design keeps freezing my browsers.
I ran the Audit tool in Chrome Developer Tools, but nothing seems that substantial. When I load it in the browser, it freezes, then loads pletely at once.
Any suggestions?
Thanks so much for your help.
I know this is a long shot, so I'm not counting on an answer, but I just for the life of me can't figure out why this web design keeps freezing my browsers.
http://fuzionve./test
I ran the Audit tool in Chrome Developer Tools, but nothing seems that substantial. When I load it in the browser, it freezes, then loads pletely at once.
Any suggestions?
Thanks so much for your help.
Share Improve this question asked Apr 10, 2013 at 17:08 M MillerM Miller 5,68010 gold badges48 silver badges69 bronze badges 5- It seems to be working fine for me. Firefox 19.0.2 on win7. – Alden Commented Apr 10, 2013 at 17:11
- Works fine on my Chrome. – JJJ Commented Apr 10, 2013 at 17:12
- I would move your JavaScript files to the bottom of the document and not in the head. The network tab shows the blocking nature of the jQuery.js file. – epascarello Commented Apr 10, 2013 at 17:13
- Works fine on Firefox + Chrome on my Win7... – Laurent S. Commented Apr 10, 2013 at 17:14
- This tool also is great developers.google./web-toolkit/speedtracer – epascarello Commented Apr 10, 2013 at 17:16
3 Answers
Reset to default 51) Remove/ment out code
2) Load Page and test if freezing
3) if still freezing, repeat from step 1
4) if not freezing, examine the code you just removed.
It works fine here.
Some advice on "easy" optimizations:
<link rel="stylesheet" href="http://fonts.googleapis./css?family=PT+Sans:400,700,400italic" />
- this is an external stylesheet. Your browser has to set up a connection with another server. Consider downloading the font (and stylesheet) to your own server.- You load 4 stylesheets, which requires 4 roundtrips to the server. Consider merging those in 1 stylesheet. If you prefer using multiple stylesheets in development, merge them into a single file in the release version.
- Same thing for scripts: you have 3 scripts. Consider merging them into 1 file in the release version.
- When your browser detects a
<script>
element, it stops rendering your page until that script file has been downloaded from your server and executed. This is because scripts can use document.write() to write HTML, changing your page. If you know your scripts don't write HTML (usually they don't, at least until the document.ready event is fired), consider using the HTML5async
ordefer
attributes (https://developer.mozilla/en-US/docs/HTML/Element/script). Note that these attributes are only supported in modern browsers.
If those things don't help, follow Brad M's advice to trace your problem.
I had the same problem when using multiples (and heavy ones) plugins, what you can do, is change some of their codes, to start after another, like callbacks, at least i changed 3-4 plugins codes to make that change.
Its possible acplish this job, checkinging, with setInterval, to see if some plugin its done. Or implement a callback, into the code, after he done, call another code.
i've found this lib, which can help you: https://github./caolan/async
I know this is a long shot, so I'm not counting on an answer, but I just for the life of me can't figure out why this web design keeps freezing my browsers.
I ran the Audit tool in Chrome Developer Tools, but nothing seems that substantial. When I load it in the browser, it freezes, then loads pletely at once.
Any suggestions?
Thanks so much for your help.
I know this is a long shot, so I'm not counting on an answer, but I just for the life of me can't figure out why this web design keeps freezing my browsers.
http://fuzionve./test
I ran the Audit tool in Chrome Developer Tools, but nothing seems that substantial. When I load it in the browser, it freezes, then loads pletely at once.
Any suggestions?
Thanks so much for your help.
Share Improve this question asked Apr 10, 2013 at 17:08 M MillerM Miller 5,68010 gold badges48 silver badges69 bronze badges 5- It seems to be working fine for me. Firefox 19.0.2 on win7. – Alden Commented Apr 10, 2013 at 17:11
- Works fine on my Chrome. – JJJ Commented Apr 10, 2013 at 17:12
- I would move your JavaScript files to the bottom of the document and not in the head. The network tab shows the blocking nature of the jQuery.js file. – epascarello Commented Apr 10, 2013 at 17:13
- Works fine on Firefox + Chrome on my Win7... – Laurent S. Commented Apr 10, 2013 at 17:14
- This tool also is great developers.google./web-toolkit/speedtracer – epascarello Commented Apr 10, 2013 at 17:16
3 Answers
Reset to default 51) Remove/ment out code
2) Load Page and test if freezing
3) if still freezing, repeat from step 1
4) if not freezing, examine the code you just removed.
It works fine here.
Some advice on "easy" optimizations:
<link rel="stylesheet" href="http://fonts.googleapis./css?family=PT+Sans:400,700,400italic" />
- this is an external stylesheet. Your browser has to set up a connection with another server. Consider downloading the font (and stylesheet) to your own server.- You load 4 stylesheets, which requires 4 roundtrips to the server. Consider merging those in 1 stylesheet. If you prefer using multiple stylesheets in development, merge them into a single file in the release version.
- Same thing for scripts: you have 3 scripts. Consider merging them into 1 file in the release version.
- When your browser detects a
<script>
element, it stops rendering your page until that script file has been downloaded from your server and executed. This is because scripts can use document.write() to write HTML, changing your page. If you know your scripts don't write HTML (usually they don't, at least until the document.ready event is fired), consider using the HTML5async
ordefer
attributes (https://developer.mozilla/en-US/docs/HTML/Element/script). Note that these attributes are only supported in modern browsers.
If those things don't help, follow Brad M's advice to trace your problem.
I had the same problem when using multiples (and heavy ones) plugins, what you can do, is change some of their codes, to start after another, like callbacks, at least i changed 3-4 plugins codes to make that change.
Its possible acplish this job, checkinging, with setInterval, to see if some plugin its done. Or implement a callback, into the code, after he done, call another code.
i've found this lib, which can help you: https://github./caolan/async
本文标签: jqueryMy web site is freezingprobably JavaScriptbut I can39t identify whyStack Overflow
版权声明:本文标题:jquery - My web site is freezing - probably JavaScript, but I can't identify why - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745544569a2155336.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论