• thingsiplay@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    3 days ago

    If the browser is programmed to report a single size, then its impossible for JavaScript to determine the actual size. Because all JS would get is the same resolution. That’s the idea of the suggestion.

    • KairuByte@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      3 days ago

      That simply doesn’t work.

      Okay, let’s say that the standard “what is the window size” JavaScript method is intercepted and altered, how do you handle setting an element to a specific percentage width and then determining how wide it is in pixels? Or any of the other ways I can think to accomplish this same thing?

      If you intercept all of those, you effectively break any site with relative movement of elements with JavaScript.

      And that’s just one example.

    • Amju Wolf@pawb.social
      link
      fedilink
      arrow-up
      2
      ·
      3 days ago

      …and then your websites break, because you actually need to render them correctly.

      …or it needs to be your actual window size, too.

      • thingsiplay@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        3 days ago

        If the browser size is a standard size which is often tested to work with, then i don’t see it as such a big of a deal. Most sites are also resolution independent. We are no longer in 2010. Do you know any site that could break because you don’t use a specific resolution?

        • Amju Wolf@pawb.social
          link
          fedilink
          arrow-up
          1
          ·
          3 days ago

          I don’t think you understand.

          If you spoof your resolution and window size to the degree that it’s undetectable you effectively have to render it in that resolution.

          Guess how websites make it so that they work on any resolution? They use relative units and whatnot that make it work that way, and all that is detectable one way or another. So you’d have to spoof it all in order to resist fingerprinting - and that is either going to break the rendering, or it’s going to effectively render that website at that resolution, making it a bad experience for regular users either way.

          I do wish this was an option for more “normal” browsers, and that they resisted fingerprinting better in some other ways, but you have to make serious compromises to make it work fully.