Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Load JavaScript in Footer

Load JavaScript in Footer

Scheduled Pinned Locked Moved General Discussion
3 Posts 3 Posters 107 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lug
    wrote on last edited by
    #1

    Hello,

    After crating a project archive for a client with Lay Theme, I am now trying to make it perform smoother and faster. GTmetrix tells me that my PageSpeed and YSlow Score are not great (Grades E and D), mostly because of the lack of file compression and CDN, as well as JavaScript parsing.

    Is there a way of loading all the external scripts as part of the footer rather than in the site’s head section? And, if not, is it necessary for Lay Theme to load all the external resources before upon loading the site?

    Thanks and best,
    Lukas

    1 Reply Last reply
    0
    • RichardR Offline
      RichardR Offline
      Richard
      Global Moderator
      wrote on last edited by Richard
      #2

      Dear @lug

      Forwarding this, and will get back to you with an answer shortly.

      Thank you for using Lay Theme and have a wonderful day,

      Sincerely
      Richard

      1 Reply Last reply
      0
      • arminunruhA Offline
        arminunruhA Offline
        arminunruh
        Global Moderator
        wrote on last edited by
        #3

        @lug said in Load JavaScript in Footer:

        Is there a way of loading all the external scripts as part of the footer rather than in the site’s head section? And, if not, is it necessary for Lay Theme to load all the external resources before upon loading the site?

        Hey @lug

        Lay Theme has many different JavaScript files, some of which need to be loaded in <head>

        Others can be loaded in the footer and they are.
        I know this is not optimal but since Lay Theme has different Addons, their js is only loaded if the addon is installed and activated.

        Please try these things:
        https://laytheme.com/documentation.html#speedingup

        And disable all plugins you don't use, even the Lay Theme ones you don't use.

        You can also use a CDN plugin, but it would be better if you could instead just use a CDN of your webhost. Cause the CDN plugins often only upload your images to CDNs.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        I also code custom websites or custom Lay features.
        💿 Email me here: 💿
        info@laytheme.com

        Before you post:
        1. When using a WordPress Cache plugin, disable it or clear your cache.
        2. Update Lay Theme and all Lay Theme Addons
        3. Disable all Plugins
        4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

        This often solves issues you might run into

        When you post:
        1. Post a link to where the problem is
        2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
        3. If the problem is difficult to explain, post screenshots / link to a video to explain it
        Online Users
        Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
        laytheme.com
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Search