https ssl

Hi,

I just activated my weather website with an ssl certificate.

Is there an generic manner to avoid mixed contents errors
and any other transition clue, welcome…?

Thanks, regards.

-= Guy =-

The chief thing to do is to change any http:// links to either // or https:// in statements. All links have to be changed to keep the lock icon working – mixed https and http will cause the lock icon to open and the site won’t be fully https compatible.

Hi Ken,

Thanks for the answer.
This is my actual nightmare.
The only efficient way I have found so far is to import the HTTP Images in a
local folder/ <?php copy('http.//myimage.gif, myfolder/myimage.gif') ?>
#

Fastidious but it works.

Kind regards.

-= Guy =-

I think a better way is to use Mike Challis’ image caching script (sample attached below). Set up the script with the source URL and the destination image names, and a time interval in the script to refresh the cached image. Then use

<img src="image-myimage.php"/>

in the page to invoke it.

Your method depends on having the source URL be always available, and it will access that source URL every time your page is loaded (leading to extra unneeded load on the source URL and delays in loading your page).

I use this method on my pages requiring external http images – the only difference is that I have the scripts executed by cron every 5 minutes, and use links to the locally cached files instead of the .php script doing the caching of the image. That means there’s always an image available on my site, and any load time for the images from the remote site is offloaded to a background cron process and not to my page’s load time.


image-myimage.txt (48 KB)