"if the protocol does not match the protocol". Huh? I think those two instances of protocol need qualifiers. (url protocol vs window protocol?)