• Hello,

    My website immediately after the <body> tag has a snippet of code to check for webp compatibility. This little piece of code must go immediately after the <body> tag to reduce the Largest Contentful Paint (LCP) as per Google’s specifications.

    No matter what I do, Breeze takes this code and places it into a .js file combined with other JavaScript code. Is there a little piece of code Breeze uses to “skip” doing this for inline code?

    i.e. <script data-breeze="skip">

    Any advice is welcome.

    Thanks,
    S.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author adeelkhan

    (@adeelkhan)

    Could you please confirm that the option of inline js is enabled?

    Thread Starter Sully

    (@ss88_uk)

    Morning,

    I can confirm this option is turned OFF however, this setting has no effect if it’s turned off/on. If I turn this off, all JS is still moved into a .js file.

    I have “Delay JS inline scripts” OFF and Group JS files ON.

    Even if everything is turned ON, I would like the option to skip certain JS that’s hard coded in, if possible.

    Plugin Author adeelkhan

    (@adeelkhan)

    You can do this by adding the js code in a separate js file and called it at your desire location path as you mentioned above. The JS file path (which you create to add the JS code snippet) called in Exclude JS option under Advance Option Tab. In this manner, your js code excludes JS minification.

    Thread Starter Sully

    (@ss88_uk)

    Morning,

    Unfortunately this is not a good solution. If I have 10 inline parts of code in one page, that’s 10 render blocking resources that need to load. This way is inefficient.

    Is it possible I could request a feature to add this type of solution to “skip” inline JS when it is hard-coded with a data attribute tag “skip” (or something similar)?

    Thanks!
    S.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Ignore certain inline JS?’ is closed to new replies.