Link href without dominion

Asked

Viewed 95 times

1

Good evening, guys.

I joined a wordpress site recently and noticed a link this way:

<a href="/carros/gol-0k" data-ss1560980866="1">Gol 0k</a>

However when I hovered over the link, it showed me the full domain URL at the bottom of my browser:

<a href="www.carros.com/carros/gol-0k" data-ss1560980866="1">Gol 0k</a>

I was curious and tried to implement here only I could not. How would do this, someone has done something like this? I think it is not JV.

  • 2

    Only the browser adds the full URL to the link when you hover your mouse, because it is a subdirectory or a page of the website.

  • Here is a good explanation on this subject: https://answall.com/questions/392423/o-que-s%C3%A3o-relative-paths-when-it-is-links-of-navigational%C3%A7%C3%A3o#392427

2 answers

0

Amanda, this function is given by the browser itself, not by the element code <a>

I tested on Firefox and Chrome, it works:

<a href="https://electronic.perina.net/">Passe o mouse AQUI</a>


0

As Ian said, this is a browser function.

It turns out that the url "/cars/gol-0k" is called relative. It does not depend on the domain and, if changed, does not influence the reference.

The url "www.carros.com/cars/gol-0k" is absolute. If the domain changes from "www.carros.com" to "www.carros.com.br", the reference no longer works.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.