Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
713 views
in Technique[技术] by (71.8m points)

javascript - Google Audit Question

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. 1 inline script block was found in the head between an external CSS file and another resource. To allow parallel downloading, move the inline script before the external CSS file, or after the next resource.

My HTML is:

<head>

    <link rel="Stylesheet" href="gStyle.css" />        
    <script type="text/javascript" src="gMain.js"></script>
    <script type="text/javascript" language="javascript">

       // Your chart object(s)
        var myChart;

        // Function to hold all chart creation
        function initCharts() {

            myChart = new ganttChart("chart1");

            myChart.gAddBar("Dynamic!", "22/3/2010", "3/4/2010");

            myChart.gLoadData("Going to the shop*4/3/2010*19/3/2010*Watching TV*9/3/2010*23/3/2010*Watching TV*1/3/2010*23/3/2010*Watching TV*18/3/2010*28/3/2010*END INPUT*1/3/2010*9/3/2010");

            myChart.gDraw();

            myChart.gChangeBarColour(1, "#dd2200");
            myChart.gChangeBarColour(2, "#9900ee");
            myChart.gChangeBarColour(3, "#00dd00");
            myChart.gChangeBarColour(4, "#ffbb00");
            myChart.gChangeBarColour(5, "#00aa99");

        }

    </script>

</head>

<body onload="initCharts()">




    <div id="chart1" class="gContainer">     


    </div>

    <div id="db"></div>

</body>

Is it getting confused between the body inline script?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Inspect the page elements. Probably your Chrome extensions are dynamically adding scripts to the page in HEAD.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...