0

Any chance to check with PHP/JavaScript is there on page any unsecured items? At work we here working with SSL and sometimes (rare, but still) someone of us is committing design elements with wrong path, would be good to add big red block with error, as a bonus for browser checks :)

2 Answers 2

1

From what I understand here, sometimes the path to an image is using http:// which is causing the browser to say that some elements on the page are not secured. It's a best practice to not specify http:// nor https:// instead use the protocol-relative url

You can easily check that any image on the page is using http:// by adding this simple css rule :

img[src^=http\:\/\/] {
    border: 5px solid red;
}

http://jsfiddle.net/qFtVD/2/

Sign up to request clarification or add additional context in comments.

Comments

1

It's pretty straight forward.

Check:

All links, images, and script, style, link, iframe tags for http://.

Regular expressions can do the trick.

Also, you can ask people to use :// instead. It automatically checks what protocol the page was opened through and links content correspondingly.

1 Comment

I've always seen it as //, not ://.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.