Title: Embedding HTTP / HTTPS source dynamically
Last modified: August 20, 2016

---

# Embedding HTTP / HTTPS source dynamically

 *  Resolved [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * (@cliffpaulick)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/embedding-http-https-source-dynamically/)
 * I tried this code
    `[gview file="//www.ok.gov/OREC/documents/Contract%20Info%
   20Pamphlet%20(11-2012).pdf"]` Notice the // instead of http:// or https://
 * Ideally, if the page loads via HTTP, it should load the PDF via HTTP, and if 
   the page loads via HTTPS, the PDF source should be HTTPS.
 * I’m posting here because this code didn’t work, even after I changed the GDE 
   Settings “File Base URL” to be blank.
 * I think this would be a good feature, since the PDF loads via iframe src and 
   an HTTP PDF on a HTTPS page would show an “insecure” warning.
 * Thank you for this plugin.
 * [http://wordpress.org/extend/plugins/google-document-embedder/](http://wordpress.org/extend/plugins/google-document-embedder/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [k3davis](https://wordpress.org/support/users/k3davis/)
 * (@k3davis)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/embedding-http-https-source-dynamically/#post-3253892)
 * Hi Clifford,
 * This is an easy fix on my part and I will be sure to add it to the final GDE 
   2.5 release (hopefully this week). In the meantime you can bypass this by turning
   off GDE’s error checking. The method for doing so varies by version (2.4.x or
   2.5) but in general look for “advanced” options and you’ll find it there. Let
   me know if you need more help.
 * Thanks for the suggestion.
 * Kevin
 *  Thread Starter [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * (@cliffpaulick)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/embedding-http-https-source-dynamically/#post-3253901)
 * I updated and it worked. Thanks!
 * However, when I updated, I got the error “GDE Error: Unable to load profile settings”
   
   I went into Network Settings (because it’s a Multisite) and Network Deactivated
   and then Network Activated and it worked again.
 * Also, I installed the plugin on a few other sites and noticed that the initial
   activation sets it to use the Enhanced Viewer, which didn’t work on any of the
   sites I installed it on, but the Standard Viewer did work for all of them.
 * Enhancement Idea: fallback to HTTP if HTTPS errors out (for pages loaded as HTTPS
   but pulling a document from a site that doesn’t have an SSL certificate)… it’s
   better to load via HTTP than not at all (worse yet, it displays “GDE Error:”,
   ick).
 * Thanks again!
 *  [k3davis](https://wordpress.org/support/users/k3davis/)
 * (@k3davis)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/embedding-http-https-source-dynamically/#post-3253903)
 * Hi Clifford,
 * The initial activation on a clean install should not use the Enhanced Viewer.
   The only reason the default profile should be configured to use the Enhanced 
   Viewer is if 1) the default profile (literally, the one named “default”) couldn’t
   be created for some reason, or 2) you’re upgrading from GDE 2.4.x and you had
   the Enhanced Viewer set there. If you found this NOT to be the case, I’d be interested
   in seeing a [log](http://www.davistribe.org/gde/settings/dx-logging/) of the 
   issue.
 * The dynamic loading of http/https doesn’t work well in cases where you’re loading
   outside documents that don’t support SSL. This will need to be more robust in
   the future. Obviously, if you know you’re pulling from a site without a cert,
   it’s better just to declare your protocol explicitly rather than dynamically.
   But hopefully this functionality can still be improved in the future.
 * Thanks for your feedback,
 * Kevin
 *  Thread Starter [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * (@cliffpaulick)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/embedding-http-https-source-dynamically/#post-3253904)
 * I emailed it. Thanks.
 *  [k3davis](https://wordpress.org/support/users/k3davis/)
 * (@k3davis)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/embedding-http-https-source-dynamically/#post-3253905)
 * Clifford,
 * Could you resend? I never received it. (checked spam folder also)
 * Thanks.
 *  Thread Starter [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * (@cliffpaulick)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/embedding-http-https-source-dynamically/#post-3253906)
 * Manually emailed it.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Embedding HTTP / HTTPS source dynamically’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/google-document-embedder_484848.svg)
 * [Google Doc Embedder](https://wordpress.org/plugins/google-document-embedder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-document-embedder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-document-embedder/)
 * [Active Topics](https://wordpress.org/support/plugin/google-document-embedder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-document-embedder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-document-embedder/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)

 * 6 replies
 * 2 participants
 * Last reply from: [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/embedding-http-https-source-dynamically/#post-3253906)
 * Status: resolved