<a href="//www.mydomain.com/" title="Commerce Pundit" target="_开发者_开发技巧blank" class="normaltext-11pt-link">Om The Eternity</a>
On click on the above link is browser dependent? will it create any problem in any browser in any case?
is it good idea to avoid the mentioned conflict?
This should be fine.
Using //
for protocol relative URLs is standards-compliant and supported by all browsers.
According to this blog post, there are two minor IE specific downsides: Resources get (obviously) cached twice if called through http and https; and CSS style sheets get loaded twice. Both not really a problem for the average-sized site, IMO.
As Pekka said, it is standards compliant and works in all browsers.
There's only one drawback: when a user saves a file and accesses it from their hard disk, the protocol will be file:
and your link will fail. Using a protocol your users will be able to just click the link and they will be redirected to the correct domain.
精彩评论