0
Welcome Guest! Login
0 items Join Now

how to move .js & .css files to before end of the <body>

  • how to move .js & .css files to before end of the <body>

    Posted 10 years 1 month ago
    • Hello,
      i want to move all .css and .js to bottom of the page but have 2 problems. "using rt-kirigami"

      1. Problem when move:
      <?php
      $gantry->displayHead();
      $gantry->addStyles(array('vmsite-ltr.css'));
      $gantry->addScripts(array('rokmediaqueries.js'));
      ?>
      the .js & .css files is OK but this method move & My meta title and page title to the bottom of the page.
      I need to move to bottom only .js and .css.

      2. When move again the files to the bottom and check page with the google analysis he find more on the mobile version more block render files like .css
      But on the desktop view everything is fine.

      Can you help me to move all .js .css files to the bottom of the page because I Want to have clear site whitout render block items.

      Thank you.
    • Last Edit: 10 years 1 month ago by Veselin DImitrov.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: how to move .js & .css files to before end of the <body>

    Posted 10 years 1 month ago
  • Re: how to move .js & .css files to before end of the <body>

    Posted 10 years 1 month ago
    • But for now this is a most important think in Page speed optimisation and after few days google will start the new update,
      this update is for mobile site optimisation and when one page have Render block Scripts in head section is very bad for the
      rating.
      We need to edit the joomla core files and need to move scripts and style sheets from head section to the component part.

      You are a designer and developer which files use Joomla to configure this head section?
  • Re: how to move .js & .css files to before end of the <body>

    Posted 10 years 1 month ago
    • Ghost forum .... :(
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: how to move .js & .css files to before end of the <body>

    Posted 10 years 1 month ago
    • Well the problem is in the framework i must ask our main dev if its possible to add a function for it when you call js files to load it in the footer, but remember some js files needs to be loaded in the header (Modernizr, jQuery UI,) because they need to be loaded before the page is rendered! For css files they need to be loaded in header!
    • Last Edit: 10 years 1 month ago by Damir.
    • Available for CUSTOM WORK with Joomla, WordPress and Grav Templates and Gantry Framework!
  • Re: how to move .js & .css files to before end of the <body>

    Posted 10 years 1 month ago
    • Ok. Im waiting you, because this is the future of web templates, but we can execute in the end of the Component part of Joomla.
      The Idea of GOogle is: head section of the site to be free & clean and then website will load quickly without render block script.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: how to move .js & .css files to before end of the <body>

    Posted 10 years 1 month ago

Time to create page: 0.063 seconds