Poll: Your view on javascript-enabled webpages



  • I don't actually know how to make a poll, so, um, have a fake poll and reply below.

    • Javascript shouldn't be on any page, ever.
    • Javascript should be used only to enhance pages visually
    • Javascript should be used to enhance functionality
    • Javascript should be used to make the whole page
    • Discourse.
    • File not found

    I personally like javascript between 'only used to enhance visually' and 'enhance functionality'.

    IMO, having javascript disabled shouldn't completely cripple your web experience, but it is OK to impact it moderately negatively (IE: You can't experience hide/show functionality, 'pretty' effects or sliding controls [such as drag/drop controls become click...click controls])

    This isn't so much a 'Javascript is evil!' view, but rather 'Javascript it useful, but there are better options for most 'heavy lifting' items.

    Just curious on peoples viewpoints.

    [Edit]
    Well shit, look at that, it turned in to a poll even though it only showed bullets in the preview pane.


  • BINNED

    @Matches said:

    Well shit, look at that, it turned in to a poll even though it only showed bullets in the preview pane.

    http://what.thedailywtf.com/t/polls/783



  • You act like I would bother to read an FAQ to post a poll on discourse.


  • Discourse touched me in a no-no place

    @Matches said:

    I don't actually know how to make a poll

    My my my. Something in DC that's discoverable... ;)

    Then again, it was written by Sam...



  • Actually, I was kind of just hoping for the best since I saw other people making polls with poll in the topic title. It was sort of a 'close your eyes, spin around and shoot' type of attempt.

    I also find it insanely ironic that Jeff hates topics with the category in the topic (IE: BUG - SOMETHING IS BROKEN) and will edit your post to drop it, but they REQUIRE you to put Poll: in the topic to create a poll)


  • mod

    You screwed it up! It should be "FILE_NOT_FOUND", not "File not found". Now everyone will be confused!



  • I found it.


  • BINNED

    On topic:

    I agree on effects and/or drag&drop (should fall back to multiselects of appropriate kind when applicable IMHO).

    I'm also fine with hijacking links if and only if they work as designed when JS is off. Ideally, you use a proper href which renders the proper page when clicked with JS off. Hijack onclick to provide AJAX loading of elements. LEAVE MIDDLE CLICK ALONE! It should behave like middle click does, damn it!

    You can also, for example, use data- attributes to provide the target element for AJAX load if needed. That way it doesn't break any functionality when browsing without JS while not requiring any sort of extra "magic" when hijacking links.



  • I WAS BUSY BEING CONFUSED ABOUT HOW TO MAKE THE POLL! I'M SORRY AND WILL FIX IT!

    JUST KIDDING! I CAN'T MODIFY THE POLL OPTIONS!


  • mod

    @Matches said:

    I WAS BUSY BEING CONFUSED ABOUT HOW TO MAKE THE POLL! I'M SORRY AND WILL FIX IT!

    JUST KIDDING! I CAN'T MODIFY THE POLL OPTIONS!

    Call a mod. They should be able to fix it for you.



  • Wait, you aren't lego man. You said the eye would be your last avatar change!


  • mod

    @boomzilla said:

    I found it.

    Yes, well, we know you actually read things. Unlike some people.



  • I was slightly bothered by the presentation. Not enough not to click it.



  • I was browsing around for some UI advice (as I've said elsewhere, I'm a back end coder, not a front end - but I know what I like to use) and came across this article which I liked:

    In the past, conventional wisdom advocated an approach called graceful degradation, which would involve adding extra “fallback” code for users or browsers that were not able to handle the fancier bits of your page.

    The graceful degradation approach to the accordion problem, for example, might be to put an expanded version of the accordion’s content between <noscript>...</noscript> tags, so that browsers without JavaScript enabled would display the expanded content. This is extra work, and is the sort of thing that really sours developers on accessibility.

    Today, we understand that this is the wrong approach.

    A much better way to solve accessibility issues is through progressive enhancement, where you start by building something that works in the simplest, most accessible environment (in this case, a browser with JavaScript disabled), and then progressively enhance it with features that will improve the user experience in browsers that support them, or silently fail in browsers that don’t.


  • BINNED

    Additional: If you can use it within requirements (http://caniuse.com/#search=history), history API actually is your friend if you're not being a jackass about it (* cough cough *).

    You can keep your (rewritten, if desired) URLs, render inital page serverside (thus not breaking opening in new tab or linking), and hijack links on load. Call history.replaceState() on link click, and badabing-badabang, back button is not broken, you don't have to cheat with hashes (thus not breaking links for people with JS off), everyone's happy.



  • Except Opera mini users. (Apparently that's a thing?)



  • Very basic functionality that the server code can't do, such as preventing the page from hitting the server when the user attempts to submit the form with invalid data.


  • BINNED

    @Matches said:

    Except Opera mini users. (Apparently that's a thing?)

    It was. I used it long time ago, before smartphones were a thing. Cool little browser for it's time.

    That percentage looks a bit high though, probably people using budget phones. I don't think any of them would complain if rerouted to non-JS version.


  • Winner of the 2016 Presidential Election

    @Onyx said:

    I'm also fine with hijacking links if and only if they work as designed when JS is off

    While I do agree with you, I think the quoted part is really hard to do. As you have seen in the heated Discourse-debate everybody uses their browser differently and would like to have a unified feeling throughout all websites they are surfing.

    My approach to using JS on websites I built (mainly private ones for fun but the whole question obviously came up even in that context) is either building a website where JS is absolutely required because the main-point of the site is a JS-driven thing (like a chat, silly games, etc.) or trying to stay away from JS as much as possible.

    Filed Under: Then again, I am not a web-dev and I am terrible at the things I do anyway... so maybe my approach was wrong all along! I even used PHP for a long time!


  • BINNED

    I've done it. Using PHP as a backend. Takes some planning and a bit of extra work, but once you have it set up you don't even have to think about it.

    I have an in-house framework that does it reasonably well. I just write my PHP as if the whole AJAX bit doesn't even exist and let the boilerplate worry about the rest.


  • sockdevs

    @Onyx said:

    I've done it. Using PHP as a backend. Takes some planning and a bit of extra work, but once you have it set up you don't even have to think about it.

    I have an in-house framework that does it reasonably well. I just write my PHP as if the whole AJAX bit doesn't even exist and let the boilerplate worry about the rest.

    Isn't that like designing for progressive enhancement (i.e. sanity) in the first place?


  • Winner of the 2016 Presidential Election

    Planning is a good start but you can still mess it up.
    There are just things you can't plan for. Browsers can change. Behaviour can change. Users can start using Touchscreens, phones with pens, phones without pens, maybe even tablets, did I already mention that browsers can change? There is also still the problem that every browser likes to do things differently (it got better when everybody started using JQuery but still).

    You being unable to account for everything is one of the first things you should learn as a web-dev.

    yes, yes, I posted an xkcd. Shame on me. It DOES however make sense in this context :smiley:

    Filed Under: It's still WAY better than to not even think about these things when writing a JS-webapp


  • BINNED

    @Arantor said:

    Isn't that like designing for progressive enhancement (i.e. sanity) in the first place?

    That was the plan all along, yes. And the main reason I didn't just run with any old framework I found on the web. I wanted something that was specifically built so you can just write your backend code, maybe tack on a few data attributes in the HTML template and get AJAX stuff for free. Most of the stuff I saw at the time was either JS frameworks that just consume JSON, or PHP frameworks with AJAX haphazardly tacked on.

    It's still a bit clunky in a few places, and there's some code that's overdue for cleanup, but once I get some rest from the Asterisk bullshit I intend to fix it up.


  • BINNED

    • I use jQuery + an occasional plugin to help me with JS compatibility.
    • I use Bootstrap to help me scale the UI so it works on multiple screen sizes.
    • I try not to overuse tooltips, or anything that relies on hovering too much.
    • I check browser compatibility tables whenever I want to use a feature that's not obviously supported in every browser
    • I test my stuff frequently

    Can I still screw something up? Sure. But the only other step I can think of is just quitting and crying in the corner. And I can't do that. All the corners are already taken.



    • Javascript should be used to enhance functionality
    • Javascript should be used to make the whole page

    Javascript should be used to enhance functionality in most pages, and may be used to make the whole page if you're doing something where it makes sense to do that (i.e. something that makes no sense as a static document).



  • I still have Opera Mini in my phone. I use Opera Classic, so I thought, why not try this one. It actually works well with most sites (with the inconvenient that every Javascript action requires a page redisplay). The funny thing is Discourse just throws an error message (won't even see you the static version of the site, which would work perfectly), but you can still open the RSS feed and browse the site through the RSS client.

    Yay for standards I guess.


  • BINNED

    As crazy as it seems that I'm kinda-sorta going to defend Discourse here... It's probably Opera's servers mucking it up.

    Correct me if I'm wrong, but Opera Mini is in permanent "Turbo" mode, meaning all the sites are first rendered on Opera's servers and then sent to you, reformatted and repackaged. That made Opera Mini (or was that one called Mobile at that time?) on old Java-based phones the only browser that could actually render proper sites legibly, while everyone else were still stuck with WAP.

    Oh, and also, Discourse won't "downgrade" you to the no-JS version itself. You have to manually disable JS in your browser.



  • This is why discourse has it's own option above entire page generation using javascript.


  • Discourse touched me in a no-no place

    @abarker said:

    Yes, well, we know you actually read things. Unlike some people.

    Reading is a barrier to Smart and Gets Things DoneTM.



  • @Matches said:

    I also find it insanely ironic that Jeff hates topics with the category in the topic (IE: BUG - SOMETHING IS BROKEN) and will edit your post to drop it, but they REQUIRE you to put Poll: in the topic to create a poll)

    If IIRC, polls are not Discourse core but a "plugin". Plugins are something Jeff tolerates, even if they do not share his view of the world.


  • Discourse touched me in a no-no place

    @faoileag said:

    If IIRC, polls are not Discourse core but a "plugin". Plugins are something Jeff tolerates, even if they do not share his view of the world.

    Jeff doesn't need polls. He already knows what he thinks the users ought to want.



  • I fall between "enhance pages visually" and "enhance functionality" for most cases. There are some cases where using JavaScript to build the entire page/site is valid, such as games or mapping applications, of which Discourse is neither.



  • @mott555 said:

    games or mapping applications, of which Discourse is neither.

    Discourse is a game of find a bug.



  • I'm winning.



  • Is it like Tetris, where you never beat the game, it just gets harder?


  • sockdevs


  • Discourse touched me in a no-no place

    @Arantor said:

    [hell]

    You're gonna love this.


  • Discourse touched me in a no-no place

    @PJH said:

    You're gonna love this.

    and if you get sick of playing it yourself:

    21 lines in Hell Tetris – 02:49
    — Albert C


  • sockdevs

    I already live in my Personal Hell Pit, why would I want more of it? XD



  • @Matches said:

    I was browsing around for some UI advice (as I've said elsewhere, I'm a back end coder, not a front end - but I know what I like to use) and came across this article which I liked:

    In the past, conventional wisdom advocated an approach called <b>graceful degradation</b>, which would involve adding extra “fallback” code for users or browsers that were not able to handle the fancier bits of your page.

    The graceful degradation approach to the accordion problem, for example, might be to put an expanded version of the accordion’s content between <noscript>...</noscript> tags, so that browsers without JavaScript enabled would display the expanded content. This is extra work, and is the sort of thing that really sours developers on accessibility.

    Today, we understand that this is the wrong approach.

    A much better way to solve accessibility issues is through <b>progressive enhancement</b>, where you start by building something that works in the simplest, most accessible environment (in this case, a browser with JavaScript disabled), and then progressively enhance it with features that will improve the user experience in browsers that support them, or silently fail in browsers that don’t.

    I was thinking about this post this morning after a friend forwarded me an email for an event later this month. Pretty much all of the event details were in an image in the email. I couldn't see the event date or time until I allowed images, which I have blocked by default in my email client.

    And that's the flaw of the design. You can't base the design of the content around users having both images and JavaScript enabled. They can be used to enhance the content, but shouldn't be responsible for the content, where avoidable.



  • So many places do that type of advertising. I have my email set to whitelist only, which puts everything in the spam folder if it's not from someone on my contact list, or someone i've sent email to.

    I regularly check the spam mail, and get offers from microsoft, godaddy, various hosting providers all which show no content at all, and i have to show content if i want to see anything. Except while I can be bothered to click in the mail, I can't be bothered to show content because I don't care that much, and I just move on to the next email.


  • BINNED

    @chubertdev said:

    I was thinking about this post this morning after a friend forwarded me an email for an event later this month. Pretty much all of the event details were in an image in the email. I couldn't see the event date or time until I allowed images, which I have blocked by default in my email client.

    I hate that shit.

    I have Thunderbird set to text only, utf-8. Any formatting in an email that I send out is incurred by the recipients client and I cannot be blamed for any encoding fails. If it doesn't work, screw you, stop using windows-1250 or whatever it's set to, it's 2014.

    Nearly got into a fight with my ex-boss because of that once, because my emails were "ugly and unprofessional". Then I sent him a 2 column list in a sans font, and it, naturally, blew up all over the body because I "aligned" it in Droid Sans, and his client loaded it in Tahoma.

    And no, I don't have the time to play with HTML tables, thanks.


  • Discourse touched me in a no-no place

    @Onyx said:

    my emails were "ugly and unprofessional".

    I take it that would have been correct if he'd said “ugly and professional”?


  • BINNED

    @dkf said:

    I take it that would have been correct if he'd said “ugly and professional”?

    In the sense of the content, yes. Although I've been known to miss a diacritic or two and just replace it with the "plain" version (c instead of č) because I was either lazy to switch the layout, or just out of habit.



  • @PJH said:

    You're [gonna love this][1].
    [1]: http://www.kongregate.com/games/banthar/hell-tetris

    So great! I can see a happy sunday coming up mastering level 1!



  • @PJH said:

    https://www.youtube.com/watch?v=reFPscApObs

    That's a real screenshot??? I so sucked at my first try!



  • WHAT IS THAT MUSIC?! HOLY SHIT MY EARS! I WAS PLAYING DEBUSSY BEFORE I HIT PLAY ON THAT VIDEO! NOW I'M DEAF

    Body is invalid. Please try to call Atwood a cunt more.


  • sockdevs

    I approve of that Twitter comment.



  • @blakeyrat said:

    WHAT IS THAT MUSIC?! HOLY SHIT MY EARS! I WAS PLAYING DEBUSSY BEFORE I HIT PLAY ON THAT VIDEO! NOW I'M DEAF

    Body is invalid. Please try to call Atwood a cunt more.


    If youtube auto-starts in your browser - your problem.

    If you take offence at the posted video: wrong post.

    If that was just an attempt at trolling: I have seen better.

    If that post is showing your real inner self, you might find this forum interesting.


  • sockdevs

    @faoileag said:

    If youtube auto-starts in your browser - your problem.

    If you take offence at the posted video: wrong post.

    If that was just an attempt at trolling: I have seen better.

    If that post is showing your real inner self, you might find this forum interesting.

    But he does get redemption for suggesting we be more offensive to Jeff.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.