I believe I’ve found a bug. I intermittently go back multiple pages when pressing back button. It frequently happens on youtube, and occasionally happens elsewhere.

In the picture, find my history where I started with the google search for “the chain” (please forgive me for having history from multiple tabs all mixed up). From here I went back and forth with the expected behavior a couple of times looking for the version I remembered. When I found the correct version, I settled in to listen to it in the background for a few songs minutes until it switched to gypsy which wasn’t what I wanted to hear. Naturally enough, I went back once- straight from gypsy to the google search, skipping rhiannon and dreams and the chain. This is reflected on the rightclick drop down from the forward button- observe the three intervening pages which are in the history are not in the forward/back list.

In general, I frequently notice this unexpected and unwanted behavior when I go to youtube. I often go to the homepage, select a video, and then try to back to the homepage only to find it take me back to the blank tab, and when I try to forward it takes me to the video without the intervening homepage.

I seem to recall times when I experienced similar behavior, but cannot put a pin in when or where and cannot at this time, despite trying, reproduce it anywhere but youtube. I haven’t tried downloading chrome or shudder using edge, mostly because fuck that, but also slightly because I am very lazy.

I also didn’t notice this behavior on my laptop which had win10 and firefox (that is, before I switched to linux as a trial over there, but I digress). I tried to search for this error, but google search is terribly corrupt and difficult to get useful results beyond eg song names. I also searched this forum for “back pages” and “back page” and didn’t find anything relevant going back a year.

Do I set my computer on fire for its disobedience, or…?

  • MrOtherGuy@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    9 months ago

    My first guess would be that this is caused by the website implementing its own navigation/history behavior using History API. That can easily mess things up, or at least not behave like you might want.

      • MrGG@lemmy.ca
        link
        fedilink
        arrow-up
        16
        ·
        9 months ago

        No. The API is correctly named, but I can see how it could be misleading (and concerning!)

        That API allows websites to programmatically go somewhere in your history. It can go forward, back, or to a specific point in your history, but it can’t see what that history is, it can only go back 3 pages back or forward 2 pages for example. It doesn’t actually know the history, it just navigates to those points in history. So Google isn’t going to know that you were on Pornhub 3 pages ago, for example.

        • DarkNightoftheSoul@mander.xyzOP
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          9 months ago

          That’s a relief >_>

          So can I disable youtube’s access to the history api? perhaps disable all access generally to see if that fixes it?

          edit: The only thing I know about APIs is that reddit is shit now.

          • MrGG@lemmy.ca
            link
            fedilink
            arrow-up
            8
            ·
            9 months ago

            I don’t believe that’s possible. I think at one point there was a way to disable all access to the history API, but I don’t believe that option exists anymore. Additionally, it would break a lot of websites.

            Unfortunately I think this is probably a result of the way YouTube implements their “auto play next video” feature, and they are unlikely to change that.

            An option might be using an alternative YouTube front-end, rather than using the YouTube site, but I don’t have a lot of experience with those. (other people on here do though)

          • Peer@discuss.tchncs.de
            link
            fedilink
            arrow-up
            6
            ·
            9 months ago

            What this API does is very limited. An API allows programmers access to some part of a system that you’re unable to use without. So it might be all of Reddit’s data, or could be as limited as allowing a webpage to access the back en forward button of your browser. Both are API’s.

            The history API allows a webpage to navigate to the next or previous page where you were, without knowing what they are. It’s the same as pressing the “previous“ button by hand. Disabling it will probably break navigation within some sites (besides; don’t think it’s possible or sensible to disable).

          • Downcount@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            9 months ago

            You have to find an extension, that blocks specific javascript functionalities, like accessing the history.

            This could achieve it (not tested yet):

            https://github.com/polcak/jsrestrictor

            BUT: If a site totally relies on it, it could prevent you from accessing some if not all of their content.

            Same could be achieved by blocking js per site (via browser settings or an extension). Here it would come down to the same scenario if they don’t provide any non-js fallback.

            Also APIs: Those things are just interfaces to interact with programs or (web) services. Say you wrote yourself a nice little program and want to open it up so that other programs would be able to interact with it: You would write an interface for it - to be more specific, an application programming interface (hence API). That’s what is enabling Apps like Sync to readout the lemmy servers or write to it, when you submit a post.

            Some of those APIs are open, some restricted (like X or this other site we don’t talk about.).