Mystery of the disappearing PDF files…in Firefox.

Google docs provides a clever tool for embedding a PDF viewer in a webpage. I use it for displaying papers within jjkpryde.com .  Part of it’s magic is embedded in an I-Frame.

Recently (for me), Firefox stopped displaying this content, replacing it with a blank html page.  Turns out that,  Apache must send  “The X-Frame-Options HTTP response header”  for Firefox to allow content to be rendered within I-Frames.  (see http://goo.gl/yR82o )

Fortunately, this is easily done by adding a .htaccess file to the site root, and once you get around MS Windows grievance with Unix file names, a simple one line text file fixes the problem.

Another day in the life of a web developer.

 

You may also like...