1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Render Blocking Script

Discussion in 'JavaScript' started by kertoon, Sep 26, 2019.

  1. #1
    It is a random-post widget script. When checked with speed tool, the javascript: https://mysite.blogspot.com/feeds/posts/default?alt=json-in-script&callback=rp_results_label&max-results=10 was remarked as a render blocking JS.
    SEMrush
    I tried adding either both "asyn" and "defer" in the script. And the widget disappeared.

    How do I fix this?
     
    kertoon, Sep 26, 2019 IP
    SEMrush
  2. sarahk

    sarahk iTamer Staff

    Messages:
    25,271
    Likes Received:
    3,442
    Best Answers:
    100
    Trophy Points:
    665
    #2
    Choose a better blogging platform?
     
    sarahk, Sep 26, 2019 IP
  3. kertoon

    kertoon Well-Known Member

    Messages:
    150
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    131
    #3
    Actually how should I tweak the script so that I do not have this problem?
     
    kertoon, Sep 26, 2019 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    8,976
    Likes Received:
    1,635
    Best Answers:
    233
    Trophy Points:
    515
    #4
    Being that it's blogspot, that's out of your control. NOT something you get to change. I'm a bit surprised you'd even be able to add attributes to it since ... are you sure you're using blogspot?

    Basically, you're SOL. S*** outta luck if so. Hence @sarahk's comment.

    Though, without seeing the actual site and knowing what the offending script does, even if you could change it we can't tell you how or where. "random post widget script" could mean almost anything, though it sounds like a crappy poorly written third party extension / mod / plugin / pickAHuffingNameForTheseAlready,

    That said, generally the first move to fix this is to move it out of <head> and to right before </body>. But that only works if the script is applying itself to the existing markup properly, something I can't guarantee without seeing the offending script and the markup it is being applied to.
     
    deathshadow, Sep 27, 2019 IP
  5. kertoon

    kertoon Well-Known Member

    Messages:
    150
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    131
    #5
    Okay, I will just remove this offending script right away. Thanks.
     
    kertoon, Sep 27, 2019 IP