问题
this script is giving me trouble in IE 9. From what I heard it was used to get rounded corners working on old IE versions. Now I don't need it anymore... And worse, it is forcing me to keep a <META content=IE=EmulateIE7 http-equiv=X-UA-Compatible>
tag or the scripts messes my opaque windows. It seems to be included automatically with the <b:include data='blog' name='all-head-content'/>
tag. Anyone knows how to prevent it from being loaded?
回答1:
I've finally figured this one out.
By replacing
<b:include data='blog' name='all-head-content'/>
With
<meta expr:content='"text/html; charset=" + data:blog.encoding' http-equiv='Content-Type'/>
<meta content='true' name='MSSmartTagsPreventParsing'/>
<meta content='blogger' name='generator'/>
<link expr:href='data:blog.homepageUrl + "favicon.ico"' rel='icon' type='image/x-icon'/>
<link expr:href='data:blog.url' rel='canonical'/>
<data:blog.feedLinks/>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<link href='http://www.blogger.com/openid-server.g' rel='openid.server'/>
</b:if>
Everything works as expected.
At least for my blog this produces the same header output than before (minus the two IE specific scripts and a third global script which I'm not sure about). I've run diff
to be sure.
Update 1
If you want the non IE specific script, just add this after the Content-Type tag:
<script type='text/javascript'>(function() { var a=window;function c(b){this.t={};this.tick=function(b,i,d){d=d!=void 0?d:(new Date).getTime();this.t[b]=[d,i]};this.tick("start",null,b)}var e=new c;a.jstiming={Timer:c,load:e};try{var g=null;a.chrome&&a.chrome.csi&&(g=Math.floor(a.chrome.csi().pageT));g==null&&a.gtbExternal&&(g=a.gtbExternal.pageT());g==null&&a.external&&(g=a.external.pageT);g&&(a.jstiming.pt=g)}catch(h){};a.tickAboveFold=function(b){var f=0;if(b.offsetParent){do f+=b.offsetTop;while(b=b.offsetParent)}b=f;b<=750&&a.jstiming.load.tick("aft")};var j=!1;function k(){j||(j=!0,a.jstiming.load.tick("firstScrollTime"))}a.addEventListener?a.addEventListener("scroll",k,!1):a.attachEvent("onscroll",k);
})();</script>
Update 2
This also removes the generated <link rel="image_src">
. I just hardcoded an image.
来源:https://stackoverflow.com/questions/5774618/disabling-ieretrofit-js-on-blogger