1

Given the following...

<!DOCTYPE html>
<html class="no-js">
    <head>
        <link rel="stylesheet" href="http://127.0.0.1:4000/css/story.css">
        <script>
            console.log('wtf do you want from me, Chrome?');
        </script>
    </head>
    <body>
        ....
    </body>

...why is the Google Chrome Dev Tools audit thing telling me:

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.

I found this answer which seems reasonable, except there is no injected javascript in my case. The above was copied directly out of the elements tab on Chrome dev console, not from page source.

That's all that I have in there. A single <link> tag and a single <script> tag. I remove the <script> tag, the notice doesn't appear on an audit. I put it back in, I get the notice.

Is Chrome telling me javascript should go at the bottom of the page? Something else?

That little red dot's refusal to go away is driving me slightly crazy.

Community
  • 1
  • 1
crowhill
  • 2,398
  • 3
  • 26
  • 55

1 Answers1

1

I remove the <script> tag, the notice doesn't appear on an audit. I put it back in, I get the notice

That little red dot's refusal to go away is driving me slightly crazy.

Try placing <script> before <link> , then run Audit

guest271314
  • 1
  • 15
  • 104
  • 177
  • @crowhill Moving `` to before closing `

    ` tag should also remove notice. See also http://stackoverflow.com/questions/143486/unobtrusive-javascript-script-at-the-top-or-the-bottom-of-the-html-code

    – guest271314 May 04 '16 at 03:28