• Resolved lljb3

    (@lljb3)


    I’m using BarbaJS for my PJAX page loading, and there’s a few instances when going to a non-PJAX page where the SVG Support plugin’s scripts don’t load. I figure this to be due to not having the correct initialize function in my JS. I currently have bodhisvgsInlineSupport() in which I’m getting an error on page load anyways.

    Is there a specific reload or initialize function that you can hint at for me to get around this issue?

    If you need to know what I mean as an example, first load https://lljb3.com then go to the Shop page in the menu.

Viewing 1 replies (of 1 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Hi there,

    Thanks for your support and using my plugin!

    I’m assuming you’re talking about your main site logo because I can see it’s rendered inline on the home page, but not the shop page.

    So it looks like you just have something lazy loading the logo.

    You can usually get around this using the new lazy loading attribute:
    <img src="your-svg-file.svg" class="style-svg" loading="eager" />
    That new loading option allows you to override the default lazy loading and force it to load on page load, and therefore not get missed by my script.

    You can read more about it here: https://addyosmani.com/blog/lazy-loading/

    This may not work if you have something else lazy loading, in which case, you will need to find what is lazy loading images and switch it off for yourSVG files you want to render inline.

    I hope this helps!

    • This reply was modified 4 years, 6 months ago by Benbodhi. Reason: added a link to information
Viewing 1 replies (of 1 total)
  • The topic ‘SVG Support AJAX Reload’ is closed to new replies.