Private browsing

Skip to the bottom

  • @philkmills  7 weeks

    Each page on the site tells me "It looks like you are using a browser in "Private Browsing" mode. Be aware that some of FAWM's features may not work properly for you." But I'm not.

    I think this has happened before, in some other year, but I'm not certain.

    Firefox Quantum 64.0 on macOS 10.13.6.
    (Safari seems fine.)

  • @tuneslayer2018  6 weeks

    Do you have any extensions running that might cause this? I don't see a message like the one you're getting when I switch my browser into incognito mode, which I would think would trigger it. Granted I'm using Chromium on Linux, not Firefox on a Mac, but it still seems like if anything would trigger a warning about private browsing, that would.

    On Wednesday I'll be back at work and can see what happens when I try looking at the site on my Mac there.

  • @philkmills  6 weeks

    Running incognito with the Chrome browser on Mac does not give the warning. Opening a private window in Opera or Safari doesn't give the warning. Just Firefox and just this site, as far as I know.

    Even funnier, a private Firefox window DOES NOT give the warning either!!

  • @philkmills  6 weeks

    I'm not a JavaScript person but a bit of debugging shows me:

    // wrapper for anything that involves localStorage
    function localStorageCheck(targetFunction) {
    if (typeof localStorage === 'object') {
    try {
    targetFunction();
    } catch (e) {
    alert('It looks like you are using a browser in "Private Browsing" mode. Be aware that some of FAWM's features may not work properly for you.');
    }
    }
    }

    ...which I think translates into: attempt something and, if it doesn't work, assume there's only one possible reason. 😀

  • @tuneslayer2018  6 weeks

    Well spotted. You did better than I would have, and I am a Javascript person, albeit only because I barely qualify under the Minimal Inclusion Rule.

    My guess is that there is indeed more than one possible reason why localStorage wouldn't be an object (i.e. JS class) but whoever wrote that code either didn't care or didn't think that far ahead. (Having been that guy at times in my career, I would consider it a distinct possibility.)

  • @philkmills  4 weeks

    Post-reset and still happening.

  • @ericdistad  4 weeks

    @philkmills - just out of curiosity, have you cleared your Firefox browser cache?

  • @torniojaws  4 weeks

    @tuneslayer2018 actually, the try...catch is inside the if check for localStorage type, so it must be of type object in order to see the alert about Private Browsing 😀 unless there is a second place that could raise the same alert.

    In other words, whatever the function was that was passed to the localStorageCheck() function raised an exception that was not handled correctly by the function implementation nor localStorageCheck() and thus it went straight to the alert about Private Browsing 😀

    So, whoever will be fixing the above: Check the exception raised by targetFunction(); and catch it in the source targetFunction(); or in localStorageCheck() (less ideal though) 😀

Leave a Message. Log in to FAWM or sign up first...