March 12, 2012
"David Nadlinger" <see@klickverbot.at> wrote in message news:zlzlrudlbyiwwmgqqftp@forum.dlang.org...
>
> Stats are pretty much the same (98.5% among ~10000 »unique« visitors over the last months) for my programming-centric blog, where I added a non-JS tracking pixel precisely because I was interested in whether the figures would different for tech-y sites.
>

Maybe a stupid question, but is there anything on those pages that requires JS? Because if so, then naturally you'll get fewer non-JS-visiters.


March 12, 2012
"Adam D. Ruppe" <destructionator@gmail.com> wrote in message news:npkazdoslxiuqxiingao@forum.dlang.org...
> On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote:
>> at the end of the day, you're still saying "fuck you" to millions of people.
>
> ...for little to no reason. It's not like making 99% of sites work without javascript takes *any* effort.
>

*Exactly*. And nobody can tell me otherwise because *I DO* exactly that sort of web development. Plus, it often makes for a *worse* user experience even when JS is on - look at Vladimir's D forums vs reddit. Vladimir put reddit to shame *on reddit*, for god's sake! And how many man-hours of effort do you think went into those D forums vs reddit?

> Indeed, going without javascript is often desirable
> anyway, since no JS sites are /much/ faster than script
> heavy sites.

Yup. Guess I already responded to this in the paragraph above :)


March 13, 2012
On Tuesday, March 13, 2012 00:27:26 Adam D. Ruppe wrote:
> On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote:
> > at the end of the day, you're still saying "fuck you" to millions of people.
> 
> ...for little to no reason. It's not like making 99% of sites work without javascript takes *any* effort.
> 
> Indeed, going without javascript is often desirable
> anyway, since no JS sites are /much/ faster than script
> heavy sites.

But that's a decision based on your needs as a website developer. If JS best suits whatever the needs of a particular website developer are, then they are completely justified in using it, because 99% of the people out there have it enabled in their browsers.

The question of whether it's the best tool for the job and whether it's reasonable to use it based on your customer base are two separate issues (except insomuch as what would be the best tool for the job _isn't_, because it doesn't work with the majority of your customer base - which isn't javascript's issue at all).

- Jonathan M Davis
March 13, 2012
On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote:
> But that's a decision based on your needs as a website developer. If JS best suits whatever the needs of a particular website developer are, then they are completely justified in using it,
> because 99% of the people out there have it enabled in their browsers.

If it takes ten seconds to support 100% of the people out there,
why not?

Though, in the majority of cases I've done, it actually
takes no extra time at all: use things like event delegation
and standard attributes.

For example, I was making a site and the client wanted a side
navigation added. Easy:

<div id="left-navigation">
  <a href="location">Name</a>
  <a href="location">Name</a>
</div>

That's the easiest way to do navigation... and it also happens
to work for everyone!

Then, he asked for a partial ajax load thing. Turns out that's
trivially easy too. On the client:

document.getElementById("left-navigation").addEventListener(
   "click", function(ev) {
        var element = getParent(ev.target, "a");
        if(!element) return;
        MySite.getPageContent(element.href).
            useToReplaceElement("page-content");
        ev.preventDefault();
   }, false);


And on the server:

Element getPageContent(string link) {
   auto document = run(link, "document");
   return document.requireElementById("page-content");
}



Boom. Now, I have the javascript he asked for, the standard
links for people who don't like that crap... and it takes no
extra work to add new links. It is just another standard link
tag.



So, then I have a comment thing kinda like reddit. I have
a "Comment" link that is supposed to show the form right
under.

<a class="comment-link">Comment</a>


On the server, I do most the work:

foreach(element; document.querySelectorAll(".comment"))
      element.href = "comment-form?parentId=" ~ encodeComponent(parentId);

Element commentForm(string parentId) {
   auto document = getDocument!"comment-form";
   auto form = document.requireElementById!Form("comment-form");
   form.setValue("parentId", parentId);
   return form;
}


And, on the client:

function commentSubmitHandler() {
    var placement = this.parentNode;
    backgroundSubmit(this, function(response) {
        placement.innerHTML += response;
    });
    return false;
}

var ch = document.getElementById("comments-holder");
ch.addEventListener("click", function(ev) {
    if(!hasClass(ev, "comment-link"))
         return;

    MySite.getPageContent(ev.href).get(function(html) {
        ev.parentNode.innerHTML += html;
        var forms = ev.parentNode.getElementsByTagName("form");
        for(var a = 0; a < forms; a++) {
             forms[a].onsubmit = commentSubmitHandler;
        }
    });
}, false);



Boom, a standard link for people without JS, and the inline
comment function for people who want that.

The standard link form won't look /great/, but hey it
cost nothing extra (you have to implement a form and
form handler anyway) to implement and it works.




Now, there *are* cases where you can't do this so easily.
If you're stuck on poor PHP I'm sure this is harder than
in D too... but really, do you have one of those cases?
March 13, 2012
> In the case of my web apps, they do *not* pull JS from other sites.  I understand and sympathize with your rationale.  It's just not enough, however, to make web developers who want their site to appear a certain way care about the market share that your opinion represents.  I'm perfectly willing to lose 1-2% of users in order to *not* test browsers in all kinds of weird configurations.  It's the same reason most web sites test only with the major browsers.

 I'm reminded of a mathematical answer involving large numbers and theory. No I never took college level math, but I've heard this from somewhere: 'If you take infinity, Divide it by Infinity, you will still have a remainder of infinity'.

 1-2% seems small, yet large at the same time. It's not 'the majority' but then again 'the majority' are idiots (Example: IE with it's VBScript, and outlook express bypassing almost all security measures at the time).

 Let's assume you make a site for power users, those who want to buy computer parts and books and related stuff like that. Now if you require JS to have it run, and all the power users refuse to use JS, you've just killed all your customers. a 6 Million customers with orders which could get hundreds of millions of dollars, lost because a non-JS wasn't offered. Don't know about you, but 6 millions people could make or break your business (Just my opinion).

 Although unlikely, what if a number of those millions don't have a high speed internet connection, perhaps borrowing a connection from a neighbor or allotted a slow amount. Do you really want to wait 2-3 minutes for a Page to load when 10-15 seconds in that case would do for raw text (and optional pictures)?

 Personally, I've used Lynx in the past. Yes it's outdated, yes it is non-graphical, yes on many things. But it's fast, small, has a tiny footprint, and is great for quite a bit of stuff. As memory serves me, it was one of the best browsers I ever used.

> This situation (where payphones were obsolete) existed long before the smartphone craze.

 Perhaps... I may be giving up my cell phone and having no phone connection. I'd buy a phone card soon, guess what I'd be using if I do need to make a phone call? :P Cell phones and TV are being pushed too hard, for less benefit unless you need to use them a lot.
March 13, 2012
On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote:
> On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote:
> > But that's a decision based on your needs as a website
> > developer. If JS best suits whatever the needs of a particular
> > website developer are, then they are completely justified in
> > using it,
> > because 99% of the people out there have it enabled in their
> > browsers.
> 
> If it takes ten seconds to support 100% of the people out there, why not?

[snip]

> Now, there *are* cases where you can't do this so easily.
> If you're stuck on poor PHP I'm sure this is harder than
> in D too... but really, do you have one of those cases?

All I'm saying is that if it makes sense for the web developer to use javascript given what they're trying to do, it's completely reasonable to expect that their users will have javascript enabled (since virtually everyone does). If there's a better tool for the job which is reasonably supported, then all the better. And if it's easy to provide a workaround for the lack of JS at minimal effort, then great. But given the fact that only a very small percentage of your user base is going to have JS disabled, it's not unreasonable to require it and not worry about the people who disable it if that's what you want to do.

- Jonathan M Davis
March 13, 2012
On Mon, Mar 12, 2012 at 09:17:22PM -0400, Jonathan M Davis wrote:
> On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote:
> > On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote:
> > > But that's a decision based on your needs as a website developer. If JS best suits whatever the needs of a particular website developer are, then they are completely justified in using it, because 99% of the people out there have it enabled in their browsers.
> > 
> > If it takes ten seconds to support 100% of the people out there, why not?
> 
> [snip]
> 
> > Now, there *are* cases where you can't do this so easily.
> > If you're stuck on poor PHP I'm sure this is harder than
> > in D too... but really, do you have one of those cases?
> 
> All I'm saying is that if it makes sense for the web developer to use javascript given what they're trying to do, it's completely reasonable to expect that their users will have javascript enabled (since virtually everyone does). If there's a better tool for the job which is reasonably supported, then all the better. And if it's easy to provide a workaround for the lack of JS at minimal effort, then great. But given the fact that only a very small percentage of your user base is going to have JS disabled, it's not unreasonable to require it and not worry about the people who disable it if that's what you want to do.
[...]

The complaint is not with using JS when it's *necessary*. It's with using JS *by default*. It's with using JS just because you can, even when it's *not needed* at all.

It's like requiring you to have a TV just to make a simple phone call. Sure, you can do cool stuff like hooking up the remote end's webcam to the TV and other such fluff like that. But *requiring* all of that for a *phone call*?  Totally unnecessary, and a totally unreasonable requirement, even if 95% (or is that 99.9%?) of all households own a TV. (And for the record, I don't own one, and do not plan to. I know I'm in the minority.  That doesn't negate the fact that such a requirement is unreasonable.)

OTOH if you want to *watch a movie*, well, then requiring a TV is completely reasonable.

The problem today is that JS is the "next cool thing", so everyone is jumping on the bandwagon, and everything from a single-page personal website to a list of links to the latest toaster oven requires JS to work, even when it's not necessary at all. That's the silliness of it all.


T

-- 
Computers shouldn't beep through the keyhole.
March 13, 2012
"Nick Sabalausky" <a@a.a> wrote in message news:jjm0c8$1vk8$1@digitalmars.com...
> "Nick Sabalausky" <a@a.a> wrote in message news:jjlvdh$1to3$1@digitalmars.com...
>> "Steven Schveighoffer" <schveiguy@yahoo.com> wrote in message news:op.wa2pimkxeav7ka@localhost.localdomain...
>>>
>>> No, it *is* the point.  As a web developer, javascript is used by the vast majority of users, so I assume it can be used.  If you don't like that, I guess that's too bad for you, you may go find content elsewhere. It's not worth my time to cater to you.
>>>
>>
>> And it's not worth my time to use your piece of shit excuse for a site.
>>
>
> And besides, you're still conventiently ignoring the fact that sites which require JS typically provide a *worse* user experience then sites that don't use it, *even when JS is enabled*.
>
> So you want to say "fuck off" to the millions of people in that "measly" 1-2% just for the sake of making your site *worse* for the other 98%? Fine, be a self-defeating idiot, if you insist.
>

I don't mean to call you personally an idiot, I apologize if it came across that way (as it probably did the way I worded it). I just meant it in terms of "you" as in "hypothetical person, for the sake of argument". Sometimes I word things really badly.


March 13, 2012
On 13 March 2012 14:58, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
> On Mon, Mar 12, 2012 at 09:17:22PM -0400, Jonathan M Davis wrote:
>> On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote:
>> > On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote:
>> > > But that's a decision based on your needs as a website developer. If JS best suits whatever the needs of a particular website developer are, then they are completely justified in using it, because 99% of the people out there have it enabled in their browsers.
>> >
>> > If it takes ten seconds to support 100% of the people out there, why not?
>>
>> [snip]
>>
>> > Now, there *are* cases where you can't do this so easily.
>> > If you're stuck on poor PHP I'm sure this is harder than
>> > in D too... but really, do you have one of those cases?
>>
>> All I'm saying is that if it makes sense for the web developer to use javascript given what they're trying to do, it's completely reasonable to expect that their users will have javascript enabled (since virtually everyone does). If there's a better tool for the job which is reasonably supported, then all the better. And if it's easy to provide a workaround for the lack of JS at minimal effort, then great. But given the fact that only a very small percentage of your user base is going to have JS disabled, it's not unreasonable to require it and not worry about the people who disable it if that's what you want to do.
> [...]
>
> The complaint is not with using JS when it's *necessary*. It's with using JS *by default*. It's with using JS just because you can, even when it's *not needed* at all.
>
> It's like requiring you to have a TV just to make a simple phone call. Sure, you can do cool stuff like hooking up the remote end's webcam to the TV and other such fluff like that. But *requiring* all of that for a *phone call*?  Totally unnecessary, and a totally unreasonable requirement, even if 95% (or is that 99.9%?) of all households own a TV. (And for the record, I don't own one, and do not plan to. I know I'm in the minority.  That doesn't negate the fact that such a requirement is unreasonable.)
>
> OTOH if you want to *watch a movie*, well, then requiring a TV is completely reasonable.
>
> The problem today is that JS is the "next cool thing", so everyone is jumping on the bandwagon, and everything from a single-page personal website to a list of links to the latest toaster oven requires JS to work, even when it's not necessary at all. That's the silliness of it all.
>
>
> T
>
> --
> Computers shouldn't beep through the keyhole.

The phrase in web development is "Progressive enhancement" that used to be all the rage at one point. I miss those days...

--
James Miller
March 13, 2012
"Era Scarecrow" <rtcvb32@yahoo.com> wrote in message news:kbvwixcrdcgakjigjezu@forum.dlang.org...
>
>> This situation (where payphones were obsolete) existed long before the smartphone craze.
>
>  Perhaps... I may be giving up my cell phone and having no phone
> connection. I'd buy a phone card soon, guess what I'd be using if I do
> need to make a phone call? :P Cell phones and TV are being pushed too
> hard, for less benefit unless you need to use them a lot.

I'm reminded of one of my favorite Futurama scenes where Hermes sees what he thinks is an ordinary run-of-the-mill suicide booth, realizes it's actually a phone, and exclaims something like "Wow! They put phones in booths now? That's great! Now I don't have to lug this thing around everywhere!" and tosses his cell in the trash.

I do actually miss pay phones. But at the same time, maintaining phone booths has *FAR* more overhead than not requiring JS, so I don't really complain about it. Plus I only have reason to use them maybe 1-4 times per *year*, wheras the web I need to use all the time.

I'd really like to get a WiFi phone actually, and use some free or cheap VoIP service. Yea, WiFi connections are a lot less prevailent (at least in the US) than cell reception, but it'd be good enough for me. You may not think it from the way I drone on and on in this NG, but I really don't talk on phones much.