2012-09-26 23 views

回答

1

這是一般的壞主意(從性能的角度來看)把javascript代碼/ CSS頁面的底部,你的頁面加載它的很多有...

下面是示例代碼和提示從您的網頁的谷歌瀏覽器審計:

A width and height should be specified for all images in order to speed up page display. The following image(s) are missing a width and/or height: 
    Logo.gif 
    tp-logo.jpg 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    image.php 
    cards.png 
    Web Page Performance 
    Optimize the order of styles and scripts (10) 
    The following external CSS files were included after an external 
JavaScript file in the document head. To ensure CSS files are downloaded in parallel, 
always include external CSS before external JavaScript. 
    css 
    normalize.css 
    main.css 
    tipped.css 
    style.css 
    buttons.css 
    jquery.tweet.css 
    inav.css 
    /revamp/../layerslider/css/layerslider.css 
    /revamp/../layerslider/skins/noskin/skin.css 
    Put CSS in the document head (1) 
    CSS in the document body adversely impacts rendering performance. 
    1 style block(s) in the /revamp/ body should be moved to the document head. 

換句話說,將所有你的JavaScript(.js文件)包括文件頭部分文件和所有的人面前把鏈接樣式表(的.css )文件。另外考慮使用最小化版本的jquery/plugins/css文件,如果你無法獲得這樣的版本,你可以使用web服務爲你轉換文件check here, the YUI compressor

+0

嗨,我已經將所有腳本移動到頭部,並且性能沒有改進。任何想法爲什麼IE9會有這麼慢的加載時間?感謝您的幫助 –

+0

奇怪的是,我的加載時間(IE9)比其他(Chrome瀏覽器)瀏覽器慢一點...嘗試禁用* .js文件一個接一個,看看是否會有改善,這樣你就知道哪個插件導致放緩... – bodi0

+0

嗨,我做到了這一點,並不能確定哪個腳本似乎是導致問題。在某些情況下,jquery甚至不會加載。是否有任何其他IE調試工具比F12我覺得很難使用。謝謝。 –

1

查看由IE9開發人員工具給出的網絡信息,您對PIE.htc有很多返回404的請求。我想IE試圖再次爲每個使用behavior: url(PIE.htc);revamp/css/W.inav.css.pagespeed.cf.o5re9TDSo5.css的樣式規則獲取文件你有9次發生(IE似乎重試獲得文件幾次)。

因此,將您的PIE.htc文件放入css文件夾中,或者在每個樣式規則中更改爲正確的URL。

這似乎是我能看到的問題。如果你解決了這個問題並且問題依然存在,我很樂意再看看這個問題。

相關問題