WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] Preload a fancybox iframe? (3 posts)

  1. MaximumFish
    Member
    Posted 9 months ago #

    Hi there,

    We're using Easy Fancybox on a gym's website to open an iframe that points to their schedule on mindbodyonline.com, among other things. It works as intended, but the MBO site uses a lot of Javascript or something else that makes it slow to load and means that the user is waiting upwards of 20 seconds while staring at a blank white box. It's easy to imagine users thinking it's broken, so we currently have some text under the button advising people to be patient. Not ideal!

    So my question is, is there any way to have the iframe preloaded in the background when the containing page is first viewed, so that when the button is clicked the content comes straight up?

    Much thanks for any help.

    Max

    http://wordpress.org/plugins/easy-fancybox/

  2. RavanH
    Member
    Plugin Author

    Posted 9 months ago #

    In theory possible, but I fear this 20 second wait will then directly impact ALL your site visitors even without clicking the iframe link...

    What you could do it put an extra iframe inside your page content and then hide it by giving it a size of 1x1 px (for example). This will mean that every visitor will be side-loading this external content without them knowing it. Then, when the link is clicked the same page will be requested again in another (fancybox) iframe but the browser will have most elements already fetched.

    But... you risk being tagged as a spam site by search engines for having hidden iframe content.

  3. MaximumFish
    Member
    Posted 9 months ago #

    Thanks for the reply. I also tried fiddling with the rel=prefetch and rel=prerender flags on the page header but it didn't seem to help.

    On further testing though, the frame is now loading a lot quicker without any tweaks. I think at the time MindBody was just having a slow day, so we've decided to leave it as it.

Reply

You must log in to post.

About this Plugin

About this Topic