Say I have an ordinary <a href="https://www.google.com" target="_self">Google</a>
on my page.
One user clicks that link but their internet is very slow, so it takes more than ten seconds to open the Google page, before that, there's nothing happening on my page. Will this cause my low INP?
If it does, should I add some animation after clicking on any external link with target="_self"
?
Update:
realworld data:
Thanks!
For a start, target="_self"
is the default so doesn't need to be added. Unless there's anything special you mean by this?
So I think your question is more, "if clicking on a link is slow, will that affect the INP for this page"
INP measures the next opportunity to paint. If there is nothing to paint, then that's OK (thought it's rare and usually good UX to give some update). But as long as you haven't blocked the main thread that's what INP really cares about.
INP also does not measure the next page load time as it's paint. That is part of the next page's performance and is measured by it's LCP.
For links, users will have an expectation as to how long they normally take and the browser will have UI to show pages are loading. So it's not usually required.
If it does, should I add some animation after clicking on any external link with target="_self"?
I'd discourage that. It's not necessary to improve the INP metrics as described above and users are well used to how their browsers work for basics like clicking links, so I wouldn't mess with those too much. SPAs often do something like this, but that's because they have to since they are not using real navigations that the browser handles.