14

I have a very frustrating problem with Google viewer, which is displaying a PDF that is embedded within an IFFRAME on my website.

The really strange thing is, that very occasionally the content does not load and the part of the screen where the IFRAME should be displayed is just blank. If I then hit the refresh button within my browser, the content displays just fine! Sometimes I can view the page 10 or 20 times before getting a blank screen.

Has anyone experienced anything similar in the past, and are there any suggestions for a remedy?

Many thanks and best regards.

user3931836
  • 184
  • 1
  • 11
  • having this same problem. One HTML file, one iframe, one pdf. Most of the time it loads, sometimes it does not. No errors. – Dani Jan 30 '18 at 17:58

2 Answers2

1

I have solved the problem...

I was calling each page in turn using a get request linked to a php file, for example:

file.php?document=1
file.php?document=2

etc. etc....

I am now loading each page as an individual file and it seems to have solved the problem.

file1.php
file2.php

Thanks for your help anyway. It's always appreciated.

My very best regards.

user3931836
  • 184
  • 1
  • 11
-1

I have used IFrames for Google sheets. Works fine for me. Might be your content is too large or you have embeded too many google documents on one page.

Karen
  • 113
  • 2
  • 13
  • Try loading 1 IFrame per html page. – Karen Apr 14 '16 at 15:49
  • I am only displaying 1 IFRAME/document on the page. It works fine most of the time and then occasionally just doesn't load. Any help will be much appreciated! – user3931836 Apr 14 '16 at 16:01
  • try this http://www.aaronpeters.nl/blog/iframe-loading-techniques-performance?%3E – Karen Apr 14 '16 at 16:04
  • http://stackoverflow.com/questions/4548984/detect-if-the-iframe-content-has-loaded-successfully – Karen Apr 14 '16 at 16:05
  • Thanks for your suggestions. Tried each suggestion in turn, especially the first link you gave me, and I am still getting the same problem... – user3931836 Apr 14 '16 at 16:39