LoadJavaScriptFile from https / running website from http ?

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
Sesztak
Posts: 172
Joined: Fri Jun 24, 2016 2:19 am

LoadJavaScriptFile from https / running website from http ?

Postby Sesztak » Sat Oct 15, 2016 12:14 pm

Dear JS-Support,

We have a practical question:

Background: sometime is practical to load external js resource from 3rd party repository, like:
await CSHTML5.Interop.LoadJavaScriptFile("https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2014-11-29/FileSaver.min.js");

The important part is the https.

If the CSHTML5 site is hosted from http (without 'S' = secure), is it possible to mix https and http ?

e.g. load external js dependencies from https repository (as in our above mentioned example: https://cdnjs ....) and the same time hosting the web site from unsecured http protocol ?

Best Regards,
Péter

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: LoadJavaScriptFile from https / running website from http ?

Postby JS-Support @Userware » Tue Oct 25, 2016 12:25 am

Dear Péter,

The answer is not specific to CSHTML5. It depends on whether in HTML you can do that or not.

It may be worth doing more research on the subject, but I think it is ok to load an "https" script from an "http" page, while the contrary is not possible. As I said though, this is not specific to CSHTML5. CSHTML5 will simply add a standard tag "<script src="https://..." type="text/javascript"/> to the header of the HTML page. If you find more information on the subject, please keep us updated.

Thanks.
Regards,
JS-Support


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 43 guests

 

 

cron