• Consensus lately has been that loading javascript in the footer is better for pageload because the page doesn’t have to wait for the javascript to load before displaying. For this reason, I’ve been putting wp_head in the footer, too, for my public themes. What are the major problems with this method? Am I better off leaving it in the <head>?

Viewing 3 replies - 1 through 3 (of 3 total)
  • What are the major problems with this method?

    Plugins use wp_head() to add additional stylesheets. Not much good putting stylesheets in the footer of a page. Also, whilst the basic premise is true – that in many cases a page could be displayed before the js is downloaded or processed – what if the js is an integral part of the page display? Pages that flash or jump won’t be too popular with visitors.

    Thread Starter multiplier

    (@multiplier)

    Stylesheets can still be called from the footer, though, no?

    Not as far as I’m aware they can’t. They need to be the <head></head> section.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Putting wp_head in the footer’ is closed to new replies.