R
R
ramovich2018-02-23 08:20:52
css
ramovich, 2018-02-23 08:20:52

How to hide visited links?

I have an HTML page with text blocks representing links

<a href="тут_адрес_ссылки" target="_blank"><div class="k">Тут какой то текст</div></a>


You need to somehow make sure that previously visited links are not displayed on the page.

Please, before advising me a:visited {display: none;}, check the performance of this method, because it did not work for me on google chrome.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Soshnikov, 2018-02-23
@ramovich

Alternatively, set a:visited to one of these: opacity:0; position:absolute; left: -999999; height: 0; overflow: hidden;
Another option: on js, when a link is clicked, write the selectors of these links to localStorage and when the page is loaded (or another event), simply remove them from the DOM.
The third option is to transfer information to the back and there already control the state of the link, for example, based on the session.
In any case, hiding visited links is a strange idea, but the topic is not about that :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question