Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

52% Positive

Analyzed from 6686 words in the discussion.

Trending Topics

#button#page#user#history#browser#web#site#google#don#click

Discussion (258 Comments)Read Original on HackerNews

firefoxdabout 5 hours ago
Ok, you can start with LinkedIn, I'll wait...

If you are wondering how it works. You get a link from LinkedIn, it's from an email or just a post someone shared. You click on it, the URL loads, and you read the post. When you click the back button, you aren't taken back to wherever you came from. Instead, your LinkedIn feed loads.

How did it happen? When you landed on the first link, the URL is replaced with the homepage first (location.replace(...) doesn't change the browser history). Then the browser history state is pushed to the original link. So it seems like you landed on the home page first then you clicked on a link. When you click the back button, you are taken back to the homepage where your feed entices you to stay longer on LinkedIn.

giorgiozabout 5 hours ago
Also www.reddit.com is/was doing the same back button hijacking. From google.com visiting a post, then clicking back and you would find yourself on Reddit general feed instead of back to Google.
DaiPlusPlusabout 3 hours ago
I'm pretty sure what you're describing is this long-standing bug[1] I've experienced only when using Mobile Safari on Reddit - affecting both old.reddit.com and the (horrible) modern Reddit. It just doesn't happen in other browsers/engines except on iOS. It's especially annoying on an iPad when I tend to use back/forward instead of open-in-new-tab-then-close on iPhone.

[1] At least, I hope it's a bug.

jncratonabout 2 hours ago
A bug that just coincidentally affects the only reddit visitors that are worth any money?
Bombthecatabout 3 hours ago
News sites are doing it too. Displaying a full display ad when you try to leave
hobofan41 minutes ago
IIRC Reddit is also doing the same thing on their mobile (Android) app.
ChocolateGodabout 2 hours ago
I usually find the back button just doesn't work on new Reddit at all.
cliabout 5 hours ago
I do not see this behaviour on the latest version of Firefox. I do use old.reddit, however.
TeMPOraLabout 4 hours ago
Old Reddit doesn't do this, it's the "new" one that pretends to be an app, that does it and host of other stupid/user-hostile shit.
myrionabout 4 hours ago
I don't use old Reddit, and haven't noticed this behaviour either.
dspillettabout 3 hours ago
> You get a link from LinkedIn [or such]. You click on it, the URL loads, and you read the post. When you click the back button, you aren't taken back to wherever you came from. Instead, […]

I've taken to opening anything in a new tab. Closing the tab is my new back button. In an idea world I shouldn't have to, of course, but we live in a world full of disks implementing dark patterns so not an ideal one. Opening in a new tab also helps me apply a “do I really care enough to give this reading time?” filter as my browsers are set to not give new tabs focus - if I've not actually looked at that tab after a little time it gets closed without me giving it any attention at all.

Specifically regarding LinkedIn and their family of dark patterns, I possibly should log in and update my status after the recent buy-out. I've not been there since updating my profile after the last change of corporate overlords ~9 years ago. Or I might just log in and close my profile entirely…

znort_about 2 hours ago
>I've taken to opening anything in a new tab.

this is the way.

bertilabout 2 hours ago
I do that everywhere, but it seems to fail for LinkedIn: they don’t redirect the link if it’s not in the same tab.
dspillettabout 2 hours ago
Bad design on their part, another reason not to revisit! If a site breaks my workflow I generally stop using the site, rather than changing my workflow.

Though I'm guessing it would work in the cases being discussed in this article & thread: when you are navigating into a site (such as linkedin) from another, rather than following internal links.

troupoabout 2 hours ago
> Closing the tab is my new back button.

In Safari if you open a new tab, don't navigate anywhere, and click back, the tab closes and takes you back to the originating page. I've gottent so used to it, I now miss it in any other browser

jarek83about 2 hours ago
LinkedIn won't bother - they don't rely on SEO
Simulacra23 minutes ago
and then if you click the back button again it just reloads the page, trapped in a vicious loop!
globular-toastabout 2 hours ago
LinkedIn is malware and it's frankly embarrassing that we seem to be stuck with it. It's like a mechanic being stuck with a wrench that doesn't just punch you in the face while using it, it opens your toolbox just to come out and punch you randomly.
zozbot234about 5 hours ago
The fix is to hold down the back button so the local history shows up, and pick the right page to go back to. Unfortunately, some versions of Chrome and/or Android seem to break this but that's a completely self-inflicted problem.
Rygianabout 5 hours ago
That's not a fix. It's a workaround.
zozbot234about 4 hours ago
It's a fix because it completely solves the issue on any site, without requiring changes from LinkedIn or any other actor.
neyaabout 4 hours ago
The fix is to not to implement anti-user patterns. What you're describing is a loophole around it.
zozbot234about 4 hours ago
> The fix is to not to implement anti-user patterns.

That's not a fix the user can implement themselves. Holding down the back button is comparatively trivial.

miki123211about 5 hours ago
The problem is, there are two conceptions of the back button, and the browser only implements one.

One conception is "take me back to the previous screen I was on", one is "take me one level up the hierarchy." They're often but not always the same.

Mac Finder is a perfect example of a program correctly implementing the two. If you're deep in some folder and then press cmd+win+l to go to ~/Downloads, cmd+up will get you to ~/, but cmd+[ will get you back to where you were before, even if this was deep in some network drive, nowhere near ~.

I feel like mobile OSes lean towards "one level up" as the default behavior, while traditional desktop OSes lean more towards tracking your exact path and letting you go back.

Arainachabout 4 hours ago
> The problem is, there are two conceptions of the back button, and the browser only implements one.

In web browsers, there is only one concept.

There is no concept of "up one level in the heirarchy". If you want that make your own button in your website.

blooalienabout 3 hours ago
> There is no concept of "up one level in the heirarchy". If you want that make your own button in your website.

https://lifehacker.com/how-to-move-up-one-url-level-in-chrom... *shrug*

TeMPOraLabout 4 hours ago
Desktop had this solved, on Windows there was and remains a distinction between "back" (history) and "up" (navigation).

Browsers actually used to have hierarchical navigation support, with buttons and all, back in the age of dinosaurs - all one had to do is to set up some meta tags in HTML head section to tell which URL is "prev"/"next"/"up". Alas, this has proven too difficult for web developers, who eventually even forgot web was meant for documents at all, and at some point browsers just hid/removed those buttons since no one was using them anyway.

The "Back" remains, and as 'Arainach wrote, it's only one concept and it's not, and never has been "up one level in the hierarchy".

EDIT:

The accepted/expected standard way for "take me up one level in hierarchy" on the web is for the page itself to display the hierarchy e.g. as breadcrumbs. The standard way to go to top level of the page is through a clickable logo of the page/brand. Neither of those need, or should, involve changing behavior of browser controls.

thn-gapabout 4 hours ago
> one is "take me one level up the hierarchy." They're often but not always the same.

Who expects this behavior? It doesn't make sense. You just want to go back where you were. Most file browsers I've used wanting to implement going up a level in hierarchy, have an arrow pointing up.

ButlerianJihadabout 3 hours ago
GNU Info and many Web 1.0 navigation schemes involved a hierarchy which did involve "Next", "Previous", "Up", and "Home" type dimensions.

For example, the Bacula documentation is still online, as a prime example of this: https://www.bacula.org/9.6.x-manuals/en/main/Getting_Started...

bfivyvysjabout 4 hours ago
Nobody
neyaabout 3 hours ago
If you reached point B from point A - and you tell someone "I would like to go back", then you are expecting to go back to A. Not some intermediate, arbitrarily chosen point C.
eviksabout 2 hours ago
You're describing 2 different concepts, back and up, not 2 backs
neeeeeeal6 minutes ago
Is there not a plugin that helps to fix this?
andreareinaabout 7 hours ago
> Notably, some instances of back button hijacking may originate from the site's ... advertising platform

I feel like anything loaded from a third party domain shouldn't be allowed to fiddle with the history stack.

zelphirkaltabout 3 hours ago
If it happened browsers started to warn their users about third party JS doing back button history stuff, I have a hunch, that many frontendies would just shrug and tell their visitors: "Oh but for our site it is OK! Just make an exception when your browser asks!" just like we get all kinds of other web BS shoved down our throats. And when the next hyped frontend framework does such some third party integration for "better history functionality" it will become common, leading to skeptics being ridiculed for not trusting sites to handle history.
latexrabout 2 hours ago
Your parent commenter didn’t suggest asking for permission, they suggested not allowing it, period.
kvdveerabout 6 hours ago
While i agree, the current JS security model rally doesn't allow for distinguishing origin for JS code. Should that ever change, advertisers will just require that you compile their library into the first party js code, negating any benefit from such a security model.
lmmabout 6 hours ago
> advertisers will just require that you compile their library into the first party js code, negating any benefit from such a security model.

It will become harder for advertisers to deny responsibility for ads that violate their stated policies if they have to submit the ads ahead of time. Also site operators will need a certain level of technical competence to do this.

miki123211about 5 hours ago
More likely, advertisers will need you to insert a "bootloader" that fetches their code and passes it to eval().

Alternatively, they might require you to set up a subdomain with a cname alias pointing to them (or a common CDN), negating any security benefits of such a practice.

Ma8eeabout 5 hours ago
The advantage would be that I know beforehand, and have the opportunity to test and, possibly, reject, what the advertiser want me to send to someone’s browser.
friendzisabout 6 hours ago
Nothing loaded from the web should be able to fiddle with any browser behavior, yet here we are.
leastabout 5 hours ago
The History API is pretty useful. It creates a lot of UX improvement opportunities when you're not polluting the stack with unnecessary state changes. It's also a great way to store state so that a user may bookmark or link something directly. It's straight up necessary for SPAs to behave how they should behave, where navigating back takes you back to the previous page.

This feels like a reasonable counter-measure.

TeMPOraLabout 4 hours ago
> It's also a great way to store state so that a user may bookmark or link something directly.

Can you unpack this please? AFAIK history stack is not preserved in the URL, therefore it cannot be preserved in a bookmark or a shared link.

hnlmorgabout 5 hours ago
Yeah but all of this is a symptom of a broader problem rather than reasons why the history API is useful.

SPAs, for example, require so many hacks to work correctly that I often wonder to myself if they’re not really just a colossal mistake that the industry is too blinded to accept.

optionalsquidabout 5 hours ago
It should be opt-in per website, per feature, because IMO it can be quite useful in some cases. Like clicking back on a slide-show bringing you to the overview page, instead of only going back one slide
lxgr18 minutes ago
> clicking back on a slide-show bringing you to the overview page

That behavior is expected in exactly one case (assuming slides, not the whole presentation, are modeled as a page each): If I navigated to that specific slide from the overview.

In any other scenario, this behavior amounts to breaking my back button, and I'll probably never visit the site again if I have that choice.

arcfourabout 4 hours ago
Opt in features are a great way to increase user frustration and confusion. See the whole new geolocation API they had to make for browsers since people would perma-deny it reflexively and then complain that geolocation features weren't working.
dspillettabout 3 hours ago
> I feel like anything loaded from a third party domain

Unfortunately this would break some libraries for SPA management that people sometimes load from CDNs (external, or under their control but not obviously & unambiguously 1st-party by hostname) instead of the main app/page location. You could argue that this is bad design IMO, and I'd agree, but it is common design so enforcing such a limit will cause enough uproar to not be worth any browser's hassle.

I do like that they follow up this warning with “We encourage site owners to thoroughly review …” - too many site/app owners moan that they don't have control over what their dependencies do as if loading someone else's code absolves them from responsibility for what it does. Making it clear from the outset that this is the site's problem, not the user's, or something that the UA is doing wrong, or the indexer is judging unfairly, is worth the extra wordage.

RobotToasterabout 4 hours ago
anything loaded from a third party domain shouldn't be allowed to run scripts.
lxgr17 minutes ago
That restriction would both be trivial to circumvent by malicious advertisers and annoying for many legitimate web concepts.
pasabout 4 hours ago
facebook.com does this as a first party site, shit sites trying to squeeze eyeball time from visitors should be put on Google's malware sites list, but apparently those are the best sites nowadays... :/
bell-cotabout 3 hours ago
Maybe it's not quite your meaning - but there are browser plugins which allow per-domain blocking of js. I use one, with the default set to deny js.
apatheticonionabout 6 hours ago
There are valid use cases however the issue is rooted in lacking browser APIs.

For instance,

- if you want to do statistics tracking (how many hits your site gets and user journeys)

- You have a widget/iframe system that needs to teardown when the SPA page is navigated away

- etc

The browser does not have a;

   globalThis.history.addEventListener('navigate')
So you must monkey patch the history API. It's impractical from a distribution standpoint to embed this code in the page bundle as it's often managed externally and has its own release schedule.
jampekkaabout 5 hours ago
Browsers now have window.navigation.addEventListener("navigate") that allows just this.

https://developer.mozilla.org/en-US/docs/Web/API/Navigation/...

apatheticonion12 minutes ago
Huh! Well I'll be
friendzisabout 6 hours ago
> - if you want to do statistics tracking (how many hits your site gets and user journeys)

You can do all of that server-side and much more reliably at that. The only reason to do any of this tracking client-side is advertisers trusting fake number go up more than sales numbers.

Havocabout 2 hours ago
Great. Can we do ctrl-f search hijacking next.

So jarring when websites replace core functionality with their own broken crap because they think they’re special.

Some also seem to hijack right click menu now

Mate4about 2 hours ago
Firefox allows you to bypass right click hijacking by holding shift before pressing right click.
ivanjermakov39 minutes ago
Don't get me started on scroll hijacking.
amadeuspagel32 minutes ago
This misses the point. Websites are allowed to replace default keyboard shortcuts for a reason. There are only a few exceptions to this, like Ctrl+W. In other words, you can design your website however you want, except to make it more difficult to leave. This is an implementation of the same philosophy.
Havoc15 minutes ago
> you can design your website however you want, except to make it more difficult to leave.

Who decreed that page navigation is in scope and search navigation is outside?

arielcostasabout 2 hours ago
Some also hijack the shortcuts to open devtools (like F12), so you have to find the option in the browser menu itself
lebuin43 minutes ago
You can also click the address bar and then press you shortcut. Should be faster and works for all shortcuts AFAIK.
musicaleabout 8 hours ago
The iron law of web encrapification: every web feature will (if possible) be employed to abuse the user, usually to push advertising.
endgameabout 8 hours ago
I cannot even reliably press [Space] any more to page down through sites that are meant to be all about content!
kiddicoabout 7 hours ago
I've always found that behavior baffling so it's interesting to hear someone using it as intended instead of being frustrated by it.
conspabout 4 hours ago
It used to be a de facto standard in many programs. Since almost no mouse had a scroll wheel, you'd use the space bar or the cursor keys. Spacebar was usually faster, I guess some people still do.
asimovDevabout 6 hours ago
i love it. my mac doesn't have the home row (don't know if that's how that row of buttons is called) so I use spacebar and shift+spacebar as pgdown and pgup when I am reading
globular-toastabout 2 hours ago
This is my biggest gripe with modern browsers. Stop fucking with my keyboard. I want my keyboard to control my agent, not some script. No key seems to be safe. The quick-search key (/) is often overriden by "clever" web devs, but not even in a consistent way. Ctrl-K to go to the browser search box is gone. I use emacs keybindings in text boxes, but those can be randomly overriden by scripts (e.g. Ctrl-B might by overridden to make stuff "bold" etc.).

I want to be able to say "Don't let any script have access to these keyboard keys". But apparently that can't be done even with extensions. I've strongly considered forking Firefox to do this, but I know how much effort that would be to maintain.

How hard would it be to write scripts that expose an interface that the user can bind to keys themselves, if they wish to?

turtleyachtabout 7 hours ago
One more for the spacebar to advance the page. Have never encountered a broken site (so far). Fingers crossed.
chongliabout 8 hours ago
It really comes down to JavaScript. The web was fine when sites were static HTML, images, and forms with server-side rendering (allowing for forums and blogs).
pottertheotterabout 8 hours ago
Did you use the web back in 1995? It was fun, but it also sucked compared to what we have now. Nothing is ever perfect, but I wouldn’t want to go back.
ryandrakeabout 7 hours ago
I’d go back in a heartbeat. Making the web a software SDK was the worst thing to happen to it.
hnlmorgabout 5 hours ago
I wrote web pages in 1995. There was actually plenty you could do, but it was all server side driven.

And the ironic thing is you are chatting on a forum that could have easily been built in 1995.

wmfabout 7 hours ago
You're not wrong but we've never really tried the combination of modern CSS with no JS. It could produce elegant designs that load really fast... or ad-filled slop but declarative.
robotswantdataabout 4 hours ago
I’d go back. The BBS and dial up days look cosy

Now it’s owned by corporates and everyone is using bloated JS frameworks.

bonesssabout 7 hours ago
I published my first website in 1995 (and while it wasn’t even a little popular, eventually a spammy gay porn site popped up with the exact same joke name, leading to a pretty odd early “what if you search for your own site” experience).

If you put 2026 media players (with modern bandwidth), on the manually curated small-editorial web of ‘95 it’d be amazing.

We used to have desktop apps, these SPA JS monstrosities are the result of MS missing the web then MS missing mobile. Instead of a desktop monopoly where ActiveX could pop up (providing better app experiences in many cases than one would think), we have cross-platform electron monstrosities and fat react apps that suck, are slow, and omfgbbq do they break. And suck. And eat up resources. Copy and paste breaks, scrolling breaks, nav gets hijacked, dark mode overridden.

Netflix, Spotify, MS have apps I see breaking on the regular on prime mainstream hardware. My modern gaming windows laptop, extra juicy GPU for all the LLM and local kubernetes admin, chokes on windows rendering. Windows isn’t just regressing, their entire stack is actively rotting, and all behind fancy web buttons.

Old man yelling at cloud, but: geeeez boys, I want to go back.

peterspathabout 6 hours ago
I would also go back in a heartbeat
themafiaabout 7 hours ago
> Did you use the web back in 1995?

I'm still not over the loss of Gopher.

miki123211about 4 hours ago
The web was not fine.

If you wanted to accomplish anything more substantial than reading static content (like an email client that beeps when you get an important email, or a chat app that shows you new messages as they come in), you needed to install a desktop app. That required you to be on the same OS that the app developer supported (goodbye Linux on the desktop), as well as to trust the dev a lot more.

We seem to have collectively forgotten the trauma of freeware. Operating an installer in the mid 2000s was much like walking through a minefield; one wrong move, and your computer was infected with crapware that kept changing your home page and search engine. It wasn't just shady apps, mainstream software (I definitely remember uTorrent and Skype doing this) was also guilty. Even updates weren't safe.

raincoleabout 5 hours ago
If JavaScript hadn't been a thing, Flash and JavaApplet would have been far more popular than they were and I really don't appreciate that timeline.
hnlmorgabout 5 hours ago
JavaScript didn’t kill Flash a Java. The web becoming cross platform did.

People started browsing on a plethora of devices from the Dreamcast to PDAs. And then Steve Jobs came a long and doubled down on the shift in accessibility. His stance on Flash was probably the only thing I agreed with him on too.

AuthAuthabout 8 hours ago
It wasnt "fine".
atoavabout 7 hours ago
Oh, the social media was much, much better. People much more open, tracking didn't exist. All the idiots still thought computers were only a thing for nerds and kids.
miki123211about 4 hours ago
This is the price we pay for openness and decentralization.

On one side, we have Apple giving us great APIs but telling us how to use them. On the other, we have W3C being extremely conservative with what they expose, exactly because of things like this.

pwdisswordfishqabout 2 hours ago
This is the price we pay for stuffing browsers with tons of imperative APIs that the browser has no choice but to implement to the letter, since analysing how they are actually used runs afoul of Rice's theorem.
phoronixrlyabout 4 hours ago
This is the price we pay for bloat...
xnxabout 5 hours ago
Those features that can't be used to show more ads will be used for fingerprinting.
zelphirkaltabout 3 hours ago
I feel like we need a complete black box layer or something, where a website can send requests to the browser to do something, but never gets any kind of reply, as to whether anything actually happened. But that would limit usefulness of it quickly, I guess.
p4bl0about 6 hours ago
That's cool if they can make it work.

I don't understand how Google's indexing work anymore. I've had some website very well indexed for years and years which suddenly disappeared from the index with no explanation, even on the Search Console ("visited, not indexed"). Simple blog entries, lightweight pages, no JavaScript, no ads, no bad practices, https enabled, informative content that is linked from elsewhere including well indexed websites (some entries even performed well on Reddit). At the same time, for the past few years I've found Google search to be a less and less reliable tool because the results are less often what I need.

Anyway, let's hope this new policy can improve things a little.

csomarabout 5 hours ago
This relates to Chrome, not to search. In regard to search, they have taken a new direction that I don't think is going to change any time soon. Some time in the last 2 years, they started removing any thing that doesn't get significant natural traffic (ie: have a 30 year old user manual for something odd that people only search for once in a while? -> removed). Last few months, I noticed that they will not index anything that seems broad (ie: if similar content exists, they won't index it regardless of your page authority).

Basically, they are turning search into Tiktok. If you try to make a search, you'll notice that now they give precedence to AI overview, Youtube, News stories, Maps, Products, etc. Anything but content.

tl;dr: content is dead in Google search.

rbitsabout 4 hours ago
> This relates to Chrome, not to search.

To me, it appears to relate to search

> Pages that are engaging in back button hijacking may be subject to manual spam actions or automated demotions, which can impact the site's performance in Google Search results.

csomarabout 3 hours ago
Good point. Chrome has a “feature” where if your website is google-flagged, it’ll display a danger alert when visiting it. For some reason I confused that with this.
direwolf20about 3 hours ago
Try Marginalia Search but be warned it doesn't index the entire web
gadders22 minutes ago
I hope this applies to Android as well. Reddit is a particularly egregious offender.
al_borlandabout 8 hours ago
Some Microsoft sites have been very guilty of this. They are the ones that stick in my head in recent memory.
lamaseryabout 8 hours ago
IIRC the Azure “portal” does this. Also likes to not record things as navigation events that really feel like they should be. Hitting back on that thing is like hitting the back button on Android, it’s the “I feel lucky” button. Anything could happen.
boomlinde14 minutes ago
Having used Azure I believe that this is the result of pure, distilled incompetence rather than malicious intent.
PhageGeneratorabout 7 hours ago
I think that is because some "pages" are really full screen modals. So the back button does take you back to the previous page, but it looks like you went back two pages (closes modal + goes back). I don't spend too much time in the Azure portal but this behavior is rampant in the Entra admin center.
TeMPOraLabout 4 hours ago
> full screen modals

Thanks. I never imagined this is a thing, it's an useful addition to my mental model of software components, to explain why back button on web behaves in weird ways for some apps.

But it sure does sound like a dumb pattern on the web.

542458about 8 hours ago
Are they? This seems about deceptive or malicious content (i.e., redirecting to ads) rather than “something in my history triggers a JS redirect”. I’ve definitely experienced the latter with MS, but never the former.
surroundabout 8 hours ago
It seems like Google's policy is unconcerned with the intent of the practice. If a website JS redirect ruins the user experience by breaking the back button, it will be demoted in search results. It doesn't matter whether or not the redirect was meant to be deceptive or malicious, websites shouldn't be ruining the user experience.
dataflowabout 7 hours ago
> It seems like Google's policy is unconcerned with the intent of the practice.

I'm reading the opposite: "If you're currently using any script or technique that inserts or replaces deceptive or manipulative pages into a user's browser history that [...]"

j16sdizabout 5 hours ago
This is Google. Most likely they will deploy an automatic scanner bot that "supposed to" handle all the edge cases. When it don't work, you will be blamed for not writing your js in the way the bot can understand.
sixothreeabout 8 hours ago
Epic store makes it impossible to navigate backwards from the checkout on mobile at least. Not sure if it's design or just poor design.
quantum_magpieabout 1 hour ago
I think most checkouts do that, to prevent duplicate payments. Dunno about epic, but I often encounter that mitigated by a dedicated ‘go back to store’ button post-checkout
SuperNinKenDoabout 7 hours ago
Happened to me yesterday through a link off here. I was already expecting it given the domain, but usually mashing back fast enough does the trick eventually. Not this time. Had to kill the tab.
Tepixabout 7 hours ago
In most browsers you can hold the back button for a second and it will let you skip back more than one step.
Kab1rabout 7 hours ago
And some websites consume the entire history that a browser displays in that menu
AndrewDuckerabout 6 hours ago
You can right-click on the back button in Firefox to see a list of previous sites to go back to.
SCdFabout 1 hour ago
Ironically the only place I encounter this is using google news, where news sites seem to detect you're in google news (I don't think these same sites do it when I'm just browing normally?), and try to upsell you their other stories before you go back to the main page.
bob1029about 6 hours ago
This seems like a good time to advertise the post/redirect/get pattern.

https://en.wikipedia.org/wiki/Post/Redirect/Get

Not strictly about hijacking back navigation but it can make experience less bumpy if you've got form submissions in the middle of the path.

lxgr13 minutes ago
TIL that this (or rather, the lack of this) is why some pages show that annoying "do you want to resubmit your post" notification, but not others, and the name for it. Thank you!
karim79about 6 hours ago
I'm a huge fan of this pattern (and as a greybeard). I honestly wonder if people think about such things this day and age where everything is react.
bob1029about 5 hours ago
It's amazing how often highly-polished web infrastructure gets put into the trash in pursuit of narrow objectives like avoiding a full page load. Very few applications actually benefit from being a single page. You tend to lose a lot more than you gain in terms of UX.
koen_hendriksabout 6 hours ago
There are frameworks that navigate like this. Laravel is the first that comes to mind. I think Django and Spring do this as well.
skrebbel19 minutes ago
How does this work? How can a site inject a totally different site into the history? I thought eg the History API only lets you add to the stack and pop, not modify history?
Advertisement
_ink_about 5 hours ago
A browser feature I wasn't aware of for too long: long press the back button, to get a list of recent URLs, allowing you to skip anything trying to hijack the back button.
Asmod4nabout 5 hours ago
That’s surely bounded now much it can show, so an attacker can just fill it up till the api throws an error
asqueella8 minutes ago
Surely the browser could enforce a limit on a domain, and make sure that the real page you came from (typically the search engine) is prominently displayed.
voidUpdateabout 5 hours ago
Or right click
parastiabout 5 hours ago
I understand this is vague on purpose but wish there was more detail. E.g., if I am running a game in a webgl canvas and "back button" has meaning within the game UI which I implement via history states, is my page now going to be demoted? This article doesn't answer that at all.
rbitsabout 4 hours ago
If it automatically adds something to the history when you visit the page, then yes. If it only adds to the history when the user clicks something, then I would assume it would be fine. Hopefully.
lxgr13 minutes ago
Isn't this a heuristic implemented by browsers already these days?
sheeptabout 4 hours ago
Your game probably has poor SEO to begin with, so the Google Search policy changes would not apply
ffsm8about 6 hours ago
I would like to mention that Google own SPA framework, angular, has redirect routes which effectively do back button hijacking if used, because they add the url you're redirecting from to the history.

https://angular.dev/guide/routing/redirecting-routes

CableNinjaabout 9 hours ago
Frustrating it took this long for something to be done about this, but glad its now got something being done.
throwaway81523about 8 hours ago
> When a user clicks the "back" button in the browser, they have a clear expectation: they want to return to the previous page. Back button hijacking breaks this fundamental expectation.

It seems pretty stupid. Instead of expanding the SEO policy bureaucracy to address a situation where a spammer hijacks the back button, the browser should have been designed in the first place to never allow that hijacking to happen. Second best approach is modify it now. While they're at it, they should also make it impossible to hijack the mode one.... oh yes, Google itself does that.

pwdisswordfishq20 minutes ago
Especially since, who cares about traditional SEO any more?
spankaleeabout 7 hours ago
What about all the very legitimate uses of programmatically adding history entries?
jack1243starabout 7 hours ago
Please explain the legitimate uses. Not once I have ever encountered a website that does something useful by modifying the behavior of my browsing history.
slurpybabout 6 hours ago
Porno sites do this thing where every click is a new tab and when you refocus the previous tab, it reloads to an ad.

Or so I have been told.

mlmonkeyabout 7 hours ago
But the question is: why are sites allowed to hijack the Back Button?!?
josephcsibleabout 7 hours ago
So that in single-page applications, it can work intuitively instead of always taking you all the way out of the app.
not2babout 7 hours ago
If the navigation simulates what would happen if we follow links to SPA#pos1, SPA#pos2, etc so that if I do two clicks within the SPA, and then hit Back three times I'm back to whatever link I followed to get to the SPA, I guess it's OK and follows user expectations. But if it is used as an excuse to trap the user in the SPA unless they kill the tab, not OK.
bonesssabout 7 hours ago
From the browsers perspective those are the same thing though. It’s a paradigm boundary.

The real answer is to have desktop applications that work like applications (buttons do what feels right), and websites that work like websites.

SPA, is a page application. Pages aren’t applications, applications aren’t pages. AutoCAD is an app, the Robotech Encyclopedia is content.

mock-possumabout 7 hours ago
Of course, but programmatically, how do you enforce that?
filcukabout 7 hours ago
Because it has a legitimate use. As anything, the tools will be abused by malicious actors
a13oabout 1 hour ago
This would have been great back when I used a search engine to visit web pages.
hysanabout 7 hours ago
Took long enough. Maybe I missed it, but I didn’t see them say how invested they are in tackling this. Promoting a rule is one thing, but everything SEO related becomes a cat and mouse game. I don’t have high confidence that this will work.
onliabout 6 hours ago
Seems invested enough to me. Adding this to the anti spam policy means they will list sites using this lower or not at all, when detected. And they use automated and manual detection for such things. Not much more they can do? And should be effective, who employs scam tactics like this is also interested in having visitors.
the_gipsyabout 4 hours ago
> We believe that the user experience comes first.

Excuse me??

felixdingabout 1 hour ago
This is great. Can Google also stop scroll hijacking?
Advertisement
kristopolousabout 6 hours ago
Almost 30 years ago I wrote an article advocating for domain level back button with a quasi mode like ctrl to traverse domains.

Would have fixed this. Too late now

oliwarnerabout 6 hours ago
Now do the Amazon app.

Number of times I've looked for something on my phone, gone through to a product page on Amazon but then have had to back out multiple times to get back to the search listing. Sometimes it's previously viewed products, sometimes it's "just" the Amazon home page. It should be one-and-done.

eBay too. I'm sure there are others.

seanalltogetherabout 2 hours ago
Does this also apply to sites like instagram that simply erase your entire back button history if you visit the site.
Aardwolfabout 4 hours ago
Why not fix this at the browser level? E.g. long or double click on back button = go to previous non-javascript-affected page (I mean by that: last page navigated to in the classical sense, ignoring dynamic histories altered by js and dynamic content)
mrobabout 3 hours ago
Double clicking is not a fix because it doubles latency, and more than doubles latency if you don't want to issue page loads that are immediately aborted. Long clicking is such a bizarre anti-feature that I never considered it might exist until I read about it in this HN discussion. Putting touchscreen-specific workarounds for lack of mouse buttons and modifier keys in a traditional GUI app is insanity.
chakintoshabout 4 hours ago
That wouldn't work because this technique messes with your history. Long press on the button will just show you a list of the previous pages you visited, and all of them will have the same link to the one you're in, with just one at the bottom of the actual URL you came from. But that's so much friction UX-wise.
Yizahiabout 2 hours ago
I'm at a stage when I click back button extremely rarely and is amazed when it works as I expected.
vsgherziabout 5 hours ago
Amazing change, fighting with the back button is my least favorite part of the ad web and a blindspot for ublock. I wonder how Google is going to track this and if SPA style react router sites would be downranked because of the custom back button behavior. I doubt it due to their popularity but I'm curious how they're going to determine what qualifies as spam
eviksabout 2 hours ago
> Why are we taking action? We believe that the user experience comes first.

What's the real reason?

nubinetworkabout 1 hour ago
It broke Gemini and of course we can't have that...
chakintoshabout 4 hours ago
Google should probably talk to Microsoft about this because for me they are the biggest offenders with this back button hijacking in their support forums.
LLLDPabout 3 hours ago
So someone developed a malicious plugin to achieve this? Otherwise, I can't imagine how they could bypass the browser to do this.
mikkomabout 4 hours ago
Maybe we can get facebook finally drop this dark pattern
Advertisement
vladdeabout 3 hours ago
i wonder if this includes sites that do auto-redirect: A -> B (auto-redirect) -> C

if i'm on page C and go back, page B will take me to page C again. i think this is more about techincal incompetence rather than malicious intent, but still annoying.

monegatorabout 6 hours ago
Phew. for a moment there i thought they would start blocking alternate uses of the back button in apps (for like when it means "go back" and when it means "close everything")

That would have severely rustled my jimmies

nottorpabout 4 hours ago
So why don't google just disable the possibility of hijacking the back button in Chrome, to give an example?
dominicroseabout 4 hours ago
It's not clear what constitutes a hijacking and how they are going to detect it. It may be OK to override the button as long as it's used in the intended way which is to go back. In a single-page application it may not trigger a navigation event.
nottorpabout 3 hours ago
> In a single-page application it may not trigger a navigation event.

So isn't that also back hijacking?

red_admiralabout 4 hours ago
In an "application" model rather than a "document" one, like MS Word online or draw.io or similar, there's no clear semantics for "back" but there is a risk of the user losing data if they can navigate away without saving.
nottorpabout 4 hours ago
This is a consequence of sites being allowed to hijack back in the first place. They can still fix it.

For your use case all you need is the page to get notified so it can save. Remember that on Android your onSaveInstanceState gets called and you have to save your state or lose it.

worksonmineabout 4 hours ago
This would break so many websites. There are valid uses for the history API, I often do modals/popups as shareable URLs, and using the back button closes it.
psidiumabout 7 hours ago
Ironically, we have an infringing website right now on the front-page of HN (nypost).
alpaca128about 4 hours ago
Great! So they'll fix the back button bugs on YouTube, and return me to the previous set of video recommendations when I use it on the homepage, right? Right? And let me return to the actual site when it detects that I lost the web connection for 0.01 seconds and hides all the content, and I then press the back button?
twismabout 8 hours ago
Reddit! I'm looking at you?
itopaloglu83about 7 hours ago
Scroll on Reddit on mobile and click on a link. The comments open in a new tab. Close the tab and the previous tab is also at the link you’ve just closed.

Makes it impossible to browse around and long click to open on a new tab doesn’t solve the issue either.

kaelwdabout 6 hours ago
And if the tab was unloaded then you press back it changes the URL but not the actual contents of the page.
concindsabout 4 hours ago
Those are all weird WebKit issues, and reddit not testing MobileSafari.

It works perfectly on Chrome, if it was intentional they would have broken it on Chrome too.

As always you can count on Apple/Safari team to not give a shit, not try to fix it, not reach out to reddit to ask them to fix it, etc.

rc_kasabout 7 hours ago
I feel like facebook is the worst culprit with this
bschwindHNabout 8 hours ago
Cool, now maybe let's do something about all the shit I have to clear out out my face before I can read a simple web page. For example, on this very article I had to click "No thanks" for cookies and then "No thanks" for a survey or something. And then there was an ad at the top for some app that I also closed.

It's like walking into some room and having to swat away a bunch of cobwebs before doing whatever it is you want to do (read some text, basically).

not_your_vaseabout 8 hours ago
Haha, we had a solution for that, called pop-up blockers. Then when they became very usable, everyone switched to overlays injected with javascript, so they became unblockable.

But thinking of this at this moment, this could be a good use for a locally ran LLM, to get rid of all this crap dynamically. I wonder why Firefox didn't use this as a usecase when they bolted AI on top of Firefox. Maybe it is time for me to check what api FF has for this

Terr_about 7 hours ago
I'm waiting for someone to develop an augmented-reality system that detects branded ads or products, compares them against a corporate-ownership database, applies policies chosen by the user, and then adds warning-stripes or censor-bars over things the user has selected against.

It would finally put some teeth behind the myth of the informed consumer, and there would be gloriously absurd court-battles from corporations. ("This is our freedom of speech and commerce, it's essential, if people don't like what we're doing they can vote with their wallets... NOT LIKE THAT STOP USING SPEECH AND COMMERCE!")

internet101010about 8 hours ago
Don't forget the useless "Got it!" popups, especially when the site blurs the screen to guide you to it.
pwgabout 8 hours ago
With uBlockOrigin set to default deny all the javascript on the page there are:

zero cookie banners

zero surveys popping up

zero ads to be closed

Just the text of the page with no other distractions in the way.

93poabout 7 hours ago
ublock origin with annoyance filters on solves 95% of this
carlosjobimabout 7 hours ago
Your problems have been solved for more than a decade. Set your browser to open pages in reader view by default and you don't have these issues.
transcriptaseabout 7 hours ago
>We believe that the user experience comes first

I’ll believe that when YouTube gives me the ability to block certain channels versus “not interested” and “don’t recommend channel” buttons that do absolutely nothing close to what I want.

Or a thousand other things, but that one in particular has been top of mind recently.

PeterStuerabout 6 hours ago
Let me permanently hide "shorts".
bot403about 7 hours ago
Or if they ever bring back the "ignore this domain" feature so we can ignore ai slop and copycat sites.

It's why I went to Kagi.

G_o_Dabout 6 hours ago
Instagram comments page requires 2 quick back press or else it won't take to previous page
NooneAtAll3about 6 hours ago
is there a policy on "home button hijacking"?

I'm tired of apps that intercept home button to ask "are you sure?" - home button is home button, return me to the main phone screen

also, ads at the bottom of the screen, so that if you miss home button you open a website

Advertisement
synackabout 8 hours ago
Are they considering all uses of window.history.pushState to be hijacking? If so, why not remove that function from Chrome?
tgsovlerkhgselabout 8 hours ago
Because clicking on a navigation button in a web app is a good reason to window.history.pushState a state that will return the user to the place where they were when they clicked the button.

Clicking the dismiss button on the cookie banner is not a reason to push a state that will show the user a screen full of ads when they try to leave. (Mentioning the cookie banner because AFAIK Chrome requires a "user gesture" before pushState works normally, https://groups.google.com/a/chromium.org/g/blink-dev/c/T8d4_...)

kroabout 7 hours ago
It's a valid question how they detect it. As there are valid usages, just checking for the existence of the function call would not be correct.

These sites likely pushState on consent actions so it appears like any user interaction.

omcnoeabout 8 hours ago
No, only if your website abuses window.history.pushState to redirect the user to spam/ad content is it considered abuse.
kartik_malikabout 3 hours ago
that's crazy things goin on
dnnddidiejabout 7 hours ago
Easy fix:

JS doesn't let you change back button behaviour.

Q. But what about SPA?

A. Draw your own app-level back button top left of page.

Another solution: make it a permisson.

layer8about 5 hours ago
Yeah, no thanks. I want to use my browser’s standard keyboard shortcut to navigate back. And also forward again. And I want to be able to inspect the history listing before I go back or forward.

Let the browser do the browsery things. Don’t make SPAs suck even more than they already do.

dnnddidiejabout 2 hours ago
So when you use a desktop app there is no back button but there is a switch to another app shortcut. Same idea.
kaelwdabout 6 hours ago
Can I preventDefault on mouse5? What about the physical back button on Android?
Hamukoabout 6 hours ago
>Draw your own app-level back button top left of page.

This is the worst idea I’ve heard all day.

sublinearabout 6 hours ago
Why not just put up a fake captcha page? When the user clicks the link to continue, the back button is now hijacked.
incognito124about 7 hours ago
Now, if they only declared scroll hijacking as spam...
globalnodeabout 4 hours ago
will google really punish sites for doing this? and if so how do i report a site? i guess i could email the site with the google link and suggest they fix it first
Animatsabout 6 hours ago
Now to prevent scroll bar hijacking.
imiricabout 6 hours ago
> We believe that the user experience comes first.

If by "user" you mean advertisers, sure you do. Everyone else is an asset to extract as much value from as possible. You actively corrupt their experience.

The fact these companies control the web and its major platforms is one of the greatest tragedies of the modern era.

sublinearabout 6 hours ago
> Notably, some instances of back button hijacking may originate from the site's included libraries or advertising platform. We encourage site owners to thoroughly review their technical implementation...

Hah. In my time working with marketing teams this is highly unlikely to happen. They're allergic to code and they far outnumber everyone else in this space. Their best practices become the standard for everyone else that's uninitiated.

What they will probably do is change that vanity URL showing up on the SERP to point to a landing page that meets the requirements (only if the referer is google). This page will have the link the user wants. It will be dressed up to be as irresistible as possible. This will become the new best practice in the docs for all SEO-related tools. Hell, even google themselves might eventually put that in their docs.

In other words, the user must now click twice to find the page with the back button hijacking. Even sweeter is that the unfettered back button wouldn't have left their domain anyway.

This just sounds like another layer of yet more frustration. Contrary to popular belief, the user will put up with a lot of additional friction if they think they're going somewhere good. This is just an extra click. Most users probably won't even notice the change. If anything there will be propaganda aimed at aspiring web devs and power users telling them to get mad at google for "requiring" landing pages getting in the way of the content (like what happened to amp pages).

kstenerudabout 6 hours ago
Now if only they'd do this for Android apps that hijack the back button to pop up things, or say "are you sure you want to leave?"
charcircuitabout 8 hours ago
Google should actually fix this from the browser side instead of trying to seriously punish potentially buggy sites.
domenicdabout 7 hours ago
We tried a few times. We got as far as gating the ability to push into the "real history stack" [1] behind a user activation (e.g. click). But, it's easy to get the user to click somewhere: just throw up a cookie banner or an "expand to see full article" or similar.

We weren't really able to figure out any technical solution beyond this. It would rely on some sort of classification of clicks as leading to "real" same-document navigations or not.

This can be done reasonably well as long as you're in a cooperative relationship with the website. For example, if you're trying to classify whether a click should emit single-page navigation performance entries for web performance measurement. (See [2].) In such a case, if the browser can get to (say) 99% accuracy by default with good heuristics and provide site owners with guidance on how to annotate or tweak their code for the remaining 1%, you're in good shape.

But if you're in an adversarial relationship with the website, i.e. it's some malicious spammer trying to hijack the back button, then the malicious site will just always go down the 1% path that slips through the browser's heuristics. And you can try playing whack-a-mole with certain code patterns, but it just never ends, and isn't a great use of engineering resources, and is likely to start degrading the experience of well-behaved sites by accident.

So, policy-based solutions make sense to me here.

[1]: "real history stack": by this I mean the user-visible one that is traversed by the browser's back button UI. This is distinct from the programmer-visible one in `navigation.entries()`, traversed by `navigation.back()` or `history.back()`. The browser's back button is explicitly allowed to skip over programmer-visible entries. https://html.spec.whatwg.org/multipage/speculative-loading.h...

[2]: https://developer.chrome.com/docs/web-platform/soft-navigati...

magicalhippoabout 2 hours ago
> We tried a few times

Classify history API, canvas etc etc as "webapp" APIs, and have them show a similar dialog to the webcam dialog.

Then I can just click no, and the scripts on the page can't mess around.

Yes Google Maps is great. No, my favorite news site doesn't need that level of access to my browser or machine, it just needs to show some images and text.

themafiaabout 7 hours ago
The back button itself feels overloaded. There's "go to previous state" and then there's "go to previous origin." In an ideal world when I doubleclick on the back button what I mean is: "get me off of this site, now."
josephcsibleabout 7 hours ago
What does this have to do with sites being buggy? This change is about obvious intentional abuse.
SuperNinKenDoabout 7 hours ago
Honestly if your site is buggy in a way that effectively breaks the browser, maybe you should be punished.
bot403about 7 hours ago
I recommend 14 days in jail for the site owner, and, if egregarious, the engineer as well.

Not life ruining but just enough to be annoying. Just like their website.

Advertisement
shevy-javaabout 2 hours ago
I don't trust Google.

We need to go back to an independent and competent research group designing standards. Right now Google pwns and controls the whole stack (well, not really ALL of it 1:1, but it has a huge influence on everything via the de-facto chrome monopoly).

Remember how Google took out ublock origin. They also lied about this aka "not safe standards" - in reality they don't WANT people to block ads.

cikabout 5 hours ago
Great. Now do Android phones...
tgsovlerkhgselabout 8 hours ago
Now do paywalls next.
ladbergabout 7 hours ago
How would you recommend that creators of valuable content get paid?
renewiltordabout 7 hours ago
Ideally, when I create valuable content I am paid and when I consume valuable content I don't pay. Advertising does this but I hate it so I don't want that. So ideally, there is no way to extract value from me but I am able to extract value from others. I think I would support someone who finds a way to enforce this.

But I am also willing to pay for valuable content an exorbitant amount if it is valuable enough. For instance, for absolutely critical information I might pay 0.79€ a month.