[Resolved] Move CSS to footer and JS files after tag

Home Forums Support [Resolved] Move CSS to footer and JS files after tag

Home Forums Support Move CSS to footer and JS files after tag

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1588967
    Sars

    Is there any code that can do this?

    “Move All CSS files to footer and JS files after </body> tag”

    Thank you

    #1589151
    David
    Staff
    Customer Support

    Hi there,

    i would not suggest moving your CSS after the closing body tag. This will cause major styling issues that will lead to FOUC ( flashes of unstyled content ) and CLS ( Content Layout Shift ) both of which will negatively affect the site ranking.

    If you need to load JS files later then cache plugins generally provide the option to defer loading or async loading. If not you can use the Flyings Scripts plugin to specifiy which JS files you want to load later.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.