Check connection when iframe loads.