Michael Andrews
Michael Andrews

Reputation: 304

Get browser to recognize http css style sheet even though site runs in https

This is only for testing purposes, but we have a site that runs on https, and I'm trying to test a new stylesheet on an external server that only has http. However, the browser doesn't seem to recognize the css at all, I'm assuming because it's not https. Is there anyway to force my browser to allow this? It would eventually be on https in production, so I just need a work around for myself. Thanks,

Upvotes: 0

Views: 26

Answers (1)

JoeJ
JoeJ

Reputation: 940

Use a protocol-free URL so the client doesn't recognise it as being an insecure item. The client can then add its own protocol to the request:

i.e. instead of

<link rel="stylesheet" href="http://example.com/css/main.css">

use

<link rel="stylesheet" href="//example.com/css/main.css">

Upvotes: 1

Related Questions