Changing web page elements' appearance by appending extra parameters to URL

Viewed 43

Recently I noticed that after searching for some term in Google and browsing the search result, the relevant web page showed my relevant search text as highlighted.

So, I noticed what Google has done is, as sending extra parameters by appending to the URL as #:~:text=this%20text%20will%20be%20highlighted.

As an example if I go to https://en.wikipedia.org/wiki/Stack_Overflow, it shows as follows;

enter image description here

But when I append #:~:text=Overflow to the URL and visit https://en.wikipedia.org/wiki/Stack_Overflow#:~:text=Overflow, then it shows as follows (note that word 'Overflow' is highlighted);

enter image description here

What I'm wondering is how this behavior is achieved? What are such other types of such parameters that we could use?

Edit: My browser is: Microsoft Edge, Version 83.0.478.45 (Official build) (64-bit)

1 Answers

Below are some more common and less advanced URL parameters but, I'll post them here anyways:

There are of course Anchor links that can be appended to the URL

<!-- https://Example.com/#top -->

<body> 
    <a name="top"> </a>
    <a href="#top">
        Go To Top Of Page
    </a>     
</body>

And URL query parameters that can be picked up by the server in a variety of ways, here is a python/Django example

# https://Example.com/?variable=someValue

import requests

def page_view(request):
    variableValue = request.GET.get('variable', None)
Related