What happens when you click a link? So, when you click on a link, there are three things that can happen.
What happens when you click a link?
1. Simple Action with url and no javascript of any other such language involve, also no css is involved.
At a high level, when you click on a link, your browser and operating system figure out where you’ve clicked. The web page that you’re viewing has hidden information associated with whatever you clicked on. That’s called a Uniform resource locator(URL). That indicates the next web page that you want to view.
Embedded inside of the URL is the name of the web site that holds the page that you’ve asked for. Your browser takes that URL, breaks out the name of the web site, and then uses the Domain Name System (DNS) to get an Internet Protocol (IP) address for the site.
Your browser then opens a Transmission Control Protocol (TCP) connection to the web site over IP. It asks to speak to the Hypertext Transfer Protocol (HTTP) server (or, for secure connections, HTTPS) which then provides the next web page in HyperText Markup Language (HTML) that your browser renders.
2. If css is involved
When CSS is involved in this scenario it will tell the browser to make changes to some elements. CSS is responsible for how your site looks and what element looks at what position.
So with the involvement of css, only sites view part can be changed like changing the size of element, color of text, hiding an element or showing any animation.
3. If there is involvement of Javascript or any other such language.
You click is an action for these languages. Your action is mapped to an action handler which contains the code or tell the browser what to do on click of this link.
With the power of Javascript the browser can act in many way with response to the click.
It can open a new page, move some elements here and there, make a request to server for dynamic data or may be close the dialogue box.
End of Article.
2 COMMENTS
Good answer back in return of this issue with firm arguments and explaining all regarding that.
Hello, of course this paragraph is in fact nice and I have learned lot of things from it
about blogging. thanks.