• Resolved Luca Grandicelli

    (@lucagrandicelli)


    Strang issue though:
    i’m trying to insert this code into the <head> section of my AMP pages through the “advanced tab”:

    <script async custom-element="amp-sticky-ad" src="https://cdn.ampproject.org/v0/amp-sticky-ad-1.0.js"></script>

    but it gets always rendered with the “async” attribute at the end, as the following:

    <script custom-element="amp-sticky-ad" src="https://cdn.ampproject.org/v0/amp-sticky-ad-1.0.js" async></script>

    Any ideas?

    P.S: all of the performance optimizations are being disabled and cache empty.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    We checked your issue. By default, the Async is adding at the end of the script. If you adding the Async in first, it will be showing in last. Can you please tell me why did you need to change the Async? Can you please tell me are you facing any problem?

    Thread Starter Luca Grandicelli

    (@lucagrandicelli)

    Thanks @ahmedkaludi for the quick answer. Basically there ain’t no difference at all, but if you pick up the example code from this Google official page (https://amp.dev/documentation/guides-and-tutorials/start/add_advanced/adding_components/), the async attribute is at the beginiing. I was just wondering if is the plugin responsible for moving that attr forward till the end of the tag.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Async attribute always at the end’ is closed to new replies.