+ 39

Why we can embed pdf from HTTPS but can not from HTTP?

Comparison sample: Embed pdf from HTTPS: https://code.sololearn.com/WN9fBXwW3Q6o/#html image result: https://s1.postimg.org/6zwfnbme1b/Screenshot_16.png Embed pdf from HTTP: https://code.sololearn.com/WDWiL1xEBio8/#html image result: https://s1.postimg.org/1h09v7dtq7/Screenshot_17.png

17th Oct 2017, 12:38 PM
Adi Pratama
Adi Pratama - avatar
4 ответов
+ 19
You may open the browser console by pressing F12 to observe the error. In this case it's due to the mixed-content security issue as it's trying to load HTTP resource from a HTTPS site (i.e. SoloLearn). The user will be vulnerable and loss the protection from HTTPS and therefore Chrome blocks it by default to protect the user. 😉 📖 Good read: https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content/How_to_fix_website_with_mixed_content
17th Oct 2017, 4:25 PM
Zephyr Koo
Zephyr Koo - avatar
+ 3
@Zephyr Koo Very interesting. @Adi Pratama Hi. How are you? My guess was that, for security, the site blocks HTTP PDFs so that you're not embedding a *.pdf.exe file, and so that no one accidentally downloads it.
19th Oct 2017, 11:50 AM
Jacob Duelz
Jacob Duelz - avatar
+ 3
@Adi It's fine.
20th Oct 2017, 11:05 AM
Jacob Duelz
Jacob Duelz - avatar
+ 2
@Adi Pratama Hi. I've finished developing my first Android app, and if you would like to check it out, here's a link to the thread. Have a nice day. *Thread Removed*
1st Nov 2017, 8:26 PM
Jacob Duelz
Jacob Duelz - avatar