10K35H 5H4KY4
10K35H 5H4KY4

Reputation: 1526

How can I host my CSS/JS on an HTTPS server

I am facing problems with loading my custom CSS in Chrome. I'm using Joomla Artforms.

Here are few Javascript console statements from chrome:

[blocked] The page at 'https://www.mysite.com/component/artforms/?formid=200' was loaded over HTTPS, but ran insecure content from 'http:// www.mysite.com/includes/js/jscalendar-1.0/calendar_stripped.js': this content should also be loaded over HTTPS.

[blocked] The page at 'https:// www.mysite.com/component/artforms/?formid=200' was loaded over HTTPS, but ran insecure content from 'http: //www.mysite.com/modules/mod_followme/style.css': this content should also be loaded over HTTPS.

Please let me know if you need more detail.

Thanks

Upvotes: 1

Views: 1588

Answers (1)

SpliFF
SpliFF

Reputation: 38976

Simplest way to get this right is to load external files using the URL syntax

//example.com/path/to/some/file.js (remote)

or

/path/to/some/file.js (local)

This will load your resource using the same protocol (HTTP or HTTPS) as your main HTML page.

Note though that this will only work if your external resource is available over HTTPS. If it isn't then there's nothing you can do except move the external resource somewhere that does support HTTPS.

Upvotes: 2

Related Questions