Fancybox retrieves the "image" twice
I have a PDF that is dynamic and being displayed in fancybox (quite nicely by the way).
But the pdf is being requested a second time on close of the fancy box popup. Is there a way to prevent this? The site "works" fine, but the server is having to generate the pdf twice for no reason.

If this helps:
$.fancybox({ type: 'html', height: '95%', width: '60%', fitToView: false, autoSize: false, overlayShow: true, hideOnContentClick: false, content: '', beforeClose: function() { $(".fancybox-inner").unwrap(); } });
Why do you have $(".fancybox-inner").unwrap();? I suspect it can cause iframe reload and therefore your file might generate twice.
That's what happens when you copy code from the internet and not sure which pieces you need and don't need. Thanks! Works perfect now!