I see some web pages that link javascript file to page like this :
<script async="" src="//www.googletagmanager.com/gtm.js"></script>
Why we use double slash ( // ) instead http://
or https://
from beginig absolute url ? what's different ?
URLs with a double slash in the path can be generated by content management systems, plugins or broken HTML, and are often caused by issues with relative linking and/or the base URL. You may require developer help to track down the origin of the issue and resolve it.
Particularly as a double slash in written work usually means "new line here".
Google's John Mueller said it isn't recommended to use // - double slashes - in your URL path. He said generally if browsers can handle it so can Googlebot.
Addresses. Internet URLs use the colon to separate the protocol (such as http: ) from the hostname or IP address.
the protocol will be inherited from whichever page you're on. If your site can be on different protocols - http
on the homepage, https
on account pages, for example - then you won't have to worry about potentially loading "insecure content."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With