문제

인터넷 연결이 느려지거나 다른 방법으로도 광고를로드하기 위해 영원히 기다리지 말라고 Google 신디케이션을 알려주는 방법은 무엇입니까? 괜찮다고 말하는 시간을 수정하고 5ms를 검색하여 광고를 얻으려면 나머지 페이지의로드가 지연되지 않습니다.

도움이 되었습니까?

해결책

그만큼 yslow FireBug의 확장은 이런 종류의 일에 적합하며, 페이지로드를 벤치마킹하고 느린 속도를 알려주고, 물건을 개선하는 데 사용할 수있는 기술을 조언합니다.

예를 들어, 사용자가 인식 한 사이트의 속도를 돕기 위해 JavaScript를 넣을 위치에 대한 조언을 제공합니다.

다른 팁

이것이 켜져 있다는 것을 의미한다고 가정합니다 당신의 사이트, 다른 콘텐츠가 먼저로드 할 수 있도록 페이지 끝에 JavaScript가로드되어 있는지 확인하십시오.

이 블로그 항목보기 "Google Ads Async (비동기)"이것에 대한 좋은 출발점을 줄 수 있습니다.

<script type="text/javascript"><!--
// dynamically Load Ads out-of-band
setTimeout((function ()
{
    // placeholder for ads
        var eleAds = document.createElement("ads");  
        // dynamic script element
        var eleScript = document.createElement("script");  
        // remember the implementation of document.write function
        w = document.write;
        // override and replace with our version
        document.write = (function(params)
        {
        // replace our placeholder with real ads
        eleAds.innerHTML = params;
        // put the old implementation back in place
        document.write=w;
        });
        // setup the ads script element
        eleScript.setAttribute("type", "text/javascript");
        eleScript.setAttribute("src", "http://pagead2.googlesyndication.com/pagead/show_ads.js");
        // add the two elements, causing the ads script to run
        document.body.appendChild(eleAds);              
        document.body.appendChild(eleScript);           
}), 1);
                //-->
        </script>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top