0
votes

I am trying to embed a PDF document using google docs viewer:

<iframe src="http://docs.google.com/gview?url=MY_FILE_URL&amp;embedded=true" style="border: none;" height="900" width="100%"></iframe>

and Its working fine, but when I try to refresh the page multiple times.. sometimes IFrame content does show up and some other times It doesn't,and I get an empty head and body inside "IFrame " tag

  • tried to set expires to: 0
  • tried to add random numbers: MY_FILE_URL?var=rand() to solve some cash issue
  • tried to add IFrame using jquery on after page has loaded

nothing seems to solve my problem..

1
did you ever get your issue resolved? - DigitalDesigner

1 Answers

2
votes

you are not accessing the https version is the issue. I had the same issue

change:

 <iframe src="http://docs.google.com/gview?url=MY_FILE_URL&amp;embedded=true" style="border: none;" height="900" width="100%"></iframe>

to

 <iframe src="https://docs.google.com/gview?url=MY_FILE_URL&=embedded=true" style="border: none;" height="900" width="100%"></iframe>

hope that helps :)