Support » Plugin: FooBox Image Lightbox WordPress Plugin » Generating JS and pre loading fonts on every page

  • Your plugin generates/places its Javascript and preloads its font on every page of my site, whether or not I’m actually displaying a Foobox.

    This is adding unnecessary weight to my load time and causes accessibility issues as your preload markup is not contained inside a landmark region and is read aloud by screen readers.

    Please consider adding logic to detect if a page is even loading a Foobox before loading everything in the footer.

    I see there’s another ticket for addressing the font pre load markup. However, I hope you’ll consider removing that markup altogether.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support phillcoxon

    (@phillcoxon)

    Hi Rachel!

    I’ve been working back through support requests and noticed we missed answering your request.

    By default, FooBox includes javascript and stylesheet assets into all pages. We do this, because we do not know if the page content contains media or not.

    However, FooBox does have an option in advanced settings (both free and Pro versions) to exclude all FooBox assets by default on the front end. A meta-box is then provided on each page to allow manual enabling for the specific pages that need FooBox.

    I’ll talk to the development team this week about adding appropriate landmark regions and how we can further improve accessibility.

    Thanks for the feedback!

    Hey Phil!

    I just found your response in my email. I hope all is well with you 🙂

    So what I meant by “please add logic” is you could do the following, especially since your assets are loaded in the footer.

    Inside the code that’s triggered to print the box markup, you can THEN register the JS and CSS and set it to load in the footer. So then when the footer loads it enqueues. Otherwise the JS/CSS isn’t enqueued.

    You could still register the CSS/JS at the top in case someone else wants to use it but, by default, it’s not enqueued unless the markup is added to the page.

    Make sense?

    Plugin Support phillcoxon

    (@phillcoxon)

    Hi @bamadesigner!

    Ahhhh – my turn to apologise for missing this until now. So sorry. 🙁

    All is well with me. I hope you’re doing great. 🙂

    I’m going to open up a support issue on this in our helpdesk and pass it on to the development team to discuss.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.