Live data from Hacker News

Why JavaScript web applications should embrace traditional URLs

9elements.com

31–40 of 45 posts

Re: Why JavaScript web applications should embrace traditional URLs

#31

Earlier quoted context omitted.

Right-o. PushState-supporting users copying URLs and sending them to IE8 and IE9 folks is one thing, as is the opposite direction. In addition, some folks currently like to mount their Backbone.js applications at a root URL that contains a query string, for example: todolist.com/app?org=nsa#location

> some folks currently like to mount their Backbone.js applications at a root URL that contains a query string That seems like the root of the problem. It seems like querystrings could otherwise be solved, but this case would certainly introduce a problem for pushState-incompatible browsers. Is there a reason this kind of app root URL isn't considered bad practice that doesn't need to be supported? Everything about i…

"Doctor, it hurts when I do this."

"Then don't do that."

Re: Why JavaScript web applications should embrace traditional URLs

#33
post #12

I'm getting rank sick of the growing number of websites killing the functionality of the back button. That, combined with Chromes senseless refusal to implement opening clicked urls that are on another domain in a new tab, means I'm often forced to click-and-hold the back button to get somewhere. Incredibly annoying.

I don't understand at all what you mean. To open pages in a new tab you middle click the link. Pages that automatically open in new tab are annoying. If Chrome has something that stops this, I'm extremely happy. The user should control whether a page opens in a new tab or not, and indeed the user can do that -- left click or middle click.

> Pages that automatically open in new tab are annoying.

This is your opinion--why should it rule the way a browser works for everyone? I think hover navigations are annoying--should Chrome break those too?

Re: Why JavaScript web applications should embrace traditional URLs

#34
post #12

Earlier quoted context omitted.

I don't understand at all what you mean. To open pages in a new tab you middle click the link. Pages that automatically open in new tab are annoying. If Chrome has something that stops this, I'm extremely happy. The user should control whether a page opens in a new tab or not, and indeed the user can do that -- left click or middle click.

I'm on a Mac, I don't have a middle mouse button.

[deleted]

Re: Why JavaScript web applications should embrace traditional URLs

#35
post #32

Earlier quoted context omitted.

I could also just left click and hold the back button to get where I need. Neither is satisfactory.

Is your keyboard really that far away?

Many times when I'm surfing the web, I'm in my recliner under a blanket, with only one hand peeking out to control the trackpad. I don't want or need to use the keyboard. It works perfectly fine until some stupid website stops the back button from functioning. Login is accomplished using LastPass, hell I can even sign up for new services 80% of the time w/o the keyboard using the form fill function.

Re: Why JavaScript web applications should embrace traditional URLs

#37
post #32

Earlier quoted context omitted.

Is your keyboard really that far away?

Many times when I'm surfing the web, I'm in my recliner under a blanket, with only one hand peeking out to control the trackpad. I don't want or need to use the keyboard. It works perfectly fine until some stupid website stops the back button from functioning. Login is accomplished using LastPass, hell I can even sign up for new services 80% of the time w/o the keyboard using the form fill function.

Bring the keyboard under the blanket too? You do now how to touch-type, right?

Re: Why JavaScript web applications should embrace traditional URLs

#38

The fundamental problem with attempting to transparently support querystrings on the client-side -- touched on a bit in this article, but not explained completely, is this: Querystrings are a server-side convention for URLs containing parameters -- the browser doesn't traditionally parse them. If you ask for document.location.search, you'll get back an opaque string containing the query part that you'll have to parse…

Not really a problem... does "app" conflict with "home" in your case? If so, then there's also an issue here... if not, then why not? Also, if not, then why not take the same approach to query strings.

    var querystring = {};
    //add actual querystring (prior to #) parameters
    //add hash's querystring, overwriting any already defined keys
    return querystring;
It's not that hard.

Re: Why JavaScript web applications should embrace traditional URLs

#39

Earlier quoted context omitted.

Many times when I'm surfing the web, I'm in my recliner under a blanket, with only one hand peeking out to control the trackpad. I don't want or need to use the keyboard. It works perfectly fine until some stupid website stops the back button from functioning. Login is accomplished using LastPass, hell I can even sign up for new services 80% of the time w/o the keyboard using the form fill function.

Bring the keyboard under the blanket too? You do now how to touch-type, right?

Because it's a laptop? Who would use a desktop on a recliner?

Re: Why JavaScript web applications should embrace traditional URLs

#40

Earlier quoted context omitted.

The thing is that it has to work cross-browser. If an IE user copies an URL with both a fragment query string and a real query string and then shares it with a Firefox user, the URL should resolve to the same thing (and the same thing the other way around). Not impossible by any means, but, as Jeremy points out, it involves subtle details :)

Right-o. PushState-supporting users copying URLs and sending them to IE8 and IE9 folks is one thing, as is the opposite direction. In addition, some folks currently like to mount their Backbone.js applications at a root URL that contains a query string, for example: todolist.com/app?org=nsa#location

I love backbone, and it works well for us. We hacked in support for full paths and query parameters and will likely end doing full page reloads for IE8/IE9 (IE10 will support push state anyway)

It seems mighty unfair that we can't have nice things because Microsoft took so long to roll out push state.

Post reply on HN