1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Optimize the order of styles and scripts + speed optizimation

Discussion in 'XenForo Questions and Support' started by Betclever, Mar 22, 2015.

  1. Betclever

    Betclever Active Member

    I'm trying to optimize the speed of the loading page and other things and I got a question regarding optimizing the order of styles and scripts.

    I have checked my website with GT Metrix and got this under "optimize the order of styles and scripts":

    Therefore, I did not understand what I have to do to improve this.
    Which template shall I modify and can someone tell me what's need to be modified?

    Another thing, to optimize the page speed, I have added this code "advised by GT Metrix" to my htacess file under public_html:

    Is this enough cause I did not notify any change for the second thing and GT Metrix displays the same message as before so am I wrong with anything?

    Thanks a lot for your contribution.
  2. Optic

    Optic Well-Known Member

    Looks like you've already moved the JavaScript into your <body> tags..

    One thing you really need to fix though is your duplicate calls to Font Awesome.

    You are inserting it five times, some on different versions too:

    Line 19:
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    Line 20:
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    Line 31:
     <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
    Line 65:
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    Line 77:
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
    You only need to insert it once (preferably the latest version) - check your style/add-ons to investigate what is causing this.
  3. Betclever

    Betclever Active Member

    Will do but where are these lines, I mean in which templates?

    I have checked under forum_list, page_container and continue but I don't know where shall I search them...

  4. Optic

    Optic Well-Known Member

    Font Awesome is not part of the default XenForo install (except if you use XenForo Media Gallery). Your style and/or add-ons are including those in the templates... you will need to search the templates to find out which ones are doing that.

    Many add-ons have an option to disable Font Awesome include to address this.
  5. melbo

    melbo Well-Known Member

    How would I do this?

Share This Page