

Pull to refresh. For the web - brandonjacoby
http://usehook.com
The feature you know and love on your phones and tablets, now for the web.Super easy to implement on your sites!
======
lowboy
This is not a good idea because it breaks years (decades?) of expected
behaviour on desktops.

When a user scrolls a page back to the top, the expectation is that they'll
see the top of the current page from the most recent pageload. With this,
there's no way to revisit the top of the page in its current state and it's
just gone when you scroll back to the top.

This doesn't save much time/effort as a refresh is a common and well-supported
function of browsers.

This conflates two user intentions: 1) scroll to the top of the page, and 2)
refresh the page to get new content. This makes #1 impossible without
automatically triggering #2.

~~~
jakub_g
I'd like to second @lowboy and add a bit unrelated but annoying thing I've
been recently noticing:

It's enough that many popular news pages break my habit (in Firefox/Chrome) to
use [Ctrl +] Shift + Left/Right to highlight the text I read with the
Left/Right arrow buttons doing some magic like going to next article etc.

Never mess with the keyboard shortcuts of the browser unless you really know
what and where you're doing. Keep in mind that Ctrl + .. often trigger browser
native shortcuts, LeftAlt + .. is used to expand menus, and RightAlt + .. is
used in some languages to type in diacritics. Unfortunately there's no much
room for shortcuts considering all of that, other than complicated combos like
Ctrl + Shift + .. (and some of that are also taken by the browser).

~~~
barbs
I'd like to third @lowboy and second jakub_g. That next/previous article
control with left/right arrow buttons is so annoying! Especially when using up
and down to navigate a page, I often accidentally hit left or right, resulting
in my suddenly viewing an article I never wanted to read.

Similarly annoying are the "Overlay" scrollbars in Ubuntu's Unity desktop.
They might be clean and out-of-the-way on touchscreen devices, where screen
real-estate is often much more valuable, but they're just plain annoying on
the desktop.

Swiping left and right, pull-to-refresh and smaller scrollbars might work on
touchscreen devices, but they don't belong on the desktop, where there is
expected behaviour derived from years of experience.

------
habosa
This is nice for those who like the pull-to-refresh trope (I'm not among them,
but that's not relevant here).

Some suggestions:

1) Wouldn't it be better to have some initialization function like
$('body').hook('Reloading...') to create the necessary markup instead of
requiring the developer to put it on each page?

2) I'm not sure how hard this would be, but I think it would be better for the
pull to refresh action to be longer and more gradual. I hit a refresh just by
scrolling up a few pixels past the top when I didn't want to trigger it.

3) I'm not sure if you already support this, but it would be nice if the
reload action could support a user-specified callback function instead of
always reloading the whole page. That way people could use it to make AJAX
calls and reload specific <div>s instead of reloading all of the page nav and
other static pieces. That's more like the behavior we see in mobile.

~~~
return0
Tangengially, people should stop using the trendy word "trope" to mean
'recurring thing'. It's only valid in a metaphorical sense.

[http://www.guardian.co.uk/media/mind-your-
language/2011/sep/...](http://www.guardian.co.uk/media/mind-your-
language/2011/sep/29/mind-your-language-buzzword-trope)

~~~
akavi
God, I abhor this sort of peevery. But especially here, when the linguistic
innovation is so damn _useful_.

The "trendy" meaning of trope, is, as far as I can tell, not one easily
replaced by another word. It's not a motif so much as a kind of generalization
of what archetype is to a character. In its narrative sense it refers to the
sort of "tools" and "parts" the story teller uses to construct their tale, and
I absolutely love the extension of meaning to refer to UX... tropes (what word
would you use here? Motif? That suggests to me more aesthetic design elements
than things like pull-to-refresh)

~~~
robertskmiles
> to refer to UX... tropes (what word would you use here? Motif?

Probably 'pattern', I guess. I agree, I think it's a very practical new usage
which doesn't introduce much ambiguity elsewhere, so I'm all for it.

------
afandian
As skakri said, this breaks the 'scroll to top' shortcut (whether it's Home or
cmd-up). The behaviour in the twitter app for android is making the best of a
bad situation (screen real-estate in short supply but touch gestures are
available). It also requires you to deliberately scroll beyond the zero
position into extra space, so you can't accidentally scroll too far.

usehoook feels like a gimmick for the sake of it, and it lets you do things,
possibly destructive things, accidentally and without meaning to to.

------
ntaylor
Cool idea, but this is a total anti-pattern. People do not expect this
behavior from scrolling on a desktop and without a proper ajax implementation
the result is far from ideal.

~~~
rothlis
Exactly, it's triggered way too easily. It should include a confirmation
mechanism like the "release to refresh" on iOS. Desktop usability vs
Touch/Mobile usability are quite different.

------
gte910h
"Pull to Refresh" is a poor description for the end user. I literally clicked
and pulled down as I would on the iPhone simulator to use pull to refresh.

~~~
ErikAugust
You could add Hammer.js and achieve this.

~~~
gte910h
I prefer how this works, honestly, but just thought the description poor

------
alpb
\- Does not work well on iPhone, not at all.

\- Why not put the actual page at something like and y=50 and scroll to y
automatically? so that pull-to-refresh part would be visible while scrolling
and cancellable.

\- Why does it requie "scrolling down a little bit" first?

\- Don't break the web please! There is no need for that on the desktops.

------
mbesto
Cool hack, but you're going to confuse the hell out of my mom... "why did the
screen just twirl?!? Did I just lose all of my information?!"

------
tehwebguy
Awesome! I was looking for something like this that works on mobile.

IMO the next version needs to be able to pull slightly without refreshing.
This way the user can know it's an option without necessarily firing it.

------
goldfeld
I don't think it's so bad as long as it's doing some ajax refresh, fetching
more content. Doing a full page refresh because I accidentally scrolled over
the top is, well, a bit over the top.

------
jblesage
If I pull down on Chrome on Nexus 4 and let it refresh, it causes a continual
loop of refreshing the page until I scroll down again. Was able to reproduce
it a few times.

------
kevincennis
It's a bad idea to link to jquery.latest in a production site. $.browser is
breaking.

------
aroman
I would definitely not want to use this for my desktop (or my laptop really),
but this seems like it would be a great way to make mobile sites feel a little
bit more mobile-y.

Kudos on the clever idea and well designed website.

~~~
city41
I know at least Sencha Touch provides this functionality for mobile sites. But
it doesn't do so with hijacking the scrollbar, it implements it just like in
native webapps.

------
clemsen
Great idea. I catch myself scrolling up before refreshing relatively often! It
would really be genius if the page didn't completely reload everytime but only
if it really changed.

------
JoshTriplett
Interesting, but more sensible for web apps than web pages; web pages have a
"refresh" button already. And as other comments have said, this doesn't
actually work as "pull to refresh", but as "scroll back to top to refresh".

Web apps do this because they don't want to look like a web browser, and
having back/forward/refresh buttons looks like a web browser (and takes up
space that could show content instead). Web pages, though, display in a
browser.

------
oftenwrong
If this was a browser extension (and of course it can be used as one), I think
it would be much more sensible. As it stands, I think most users would be
confused and surprised by it. If someone can make a popular site with it,
maybe it will become a commonly-understood and expected feature.

Speaking more personally, this is why I use NoScript. I do not like dealing
with this kind of odd, site-specific functionality. My browsers have refresh
already.

------
PavlovsCat
_We love that neat little "pull to refresh" feature on our devices_

We do? I might prefer lots of little buttons and scroll wheels, DSLR style :P

------
taintlove
This would work only on mobile-only web sites. I for one would be incredibly
irritated if I were to, say, write a longass comment and then accidentally
swipe up on my trackpad and lose 20 minutes of work. I've done it before in
other stupid ways, it's very frustrating, and i just end up being too fed up
to type up my thoughts again

------
aboutaaron
This could interesting from development, but LiveReload exist, so I'm curious
what the market is. As others have said, if you could scroll to the top
without firing the reload immediately (and it worked on mobile) this could be
a neat tool.

------
shanselman
Clever, but doesn't behave like it does on a phone. I have a touch enabled
laptop running Chrome. I visit the page. Try to Pull to Refresh. It doesn't
work. It seems to be setup to watch for scrolling rather than actual Pulling
to Refresh.

------
skakri
Unfortunately this plugin makes Home/Page up buttons unusable.

------
joonix
Why not make it an actual "pull down" with the mouse rather than simply
scrolling down? This is not the same as the mobile implementation.

------
twiceaday
You should be able to pull-to-refresh when at the top of the page.

------
sharkweek
I'd love something like this for HN / Reddit / etc -- great work!

------
MatthewPhillips
Is this not open source?

------
emehrkay
Scroll to the top to refresh

