

Ask HN: What was the Windows “refresh” button for? - tarikozket

Why there was a &quot;refresh&quot; button in the context menu when you right click on desktop in Windows?
======
TeMPOraL
You could refresh any folder in Explorer, not just your desktop. It's not just
about Active Desktop 'michaelt mentioned (which had a refresh, but I guess it
was a _different_ refresh, coming from IE and not explorer.exe), but - as
'UnoriginalGuy hinted - because Explorer could, and often did, go out of sync
for various reasons. It didn't affect only networked drives, it happened
equally well when you had enough many files in a folder (something must have
been timing out) or your computer was overloaded. The most common case I
recall - Explorer didn't automatically show files created by other programs,
sometimes it didn't even show a folder or a file you created via context menu.

Actually, I'm pretty sure some of this still happens today, in particular I
remember noticing on Vista/Win7 that Explorer sometimes doesn't immediately
refresh the folder contents when there's a new file created by external
application (e.g. a log file), and refresh/F5 is useful to get this file
visible immediately.

Funny thing, per the phenomenon of operant conditioning, over the years of
using Windows I learned to regularly refresh Explorer windows via F5 to ensure
I always see what's really there, sometimes just for my own peace of mind.

~~~
moberemk
An example of this: One thing that Windows versions up to at least 7 have
always had issues with is that when you rename a file to be the same name with
a slightly different case, say after changing an uppercase letter to a
lowercase one, Explorer doesn't seem to pick up on the change until a refresh
is manually triggered.

~~~
TeMPOraL
Oh, and here I always thought it just doesn't rename the file at all. NTFS is
case-sensitive but Explorer is only case-preserving, so I thought it was just
assuming I typed in the same name. When I wanted to change the case of a file
name, I always renamed the file first to something else, eg. "Foo.txt" =>
"bar.txt" => "foo.txt". Thanks for the information :).

~~~
arthulia
NTFS is case aware, but not really case sensitive.

~~~
therein
How does that work? Did they implement case sensitivity and then decided to
not use it?

~~~
rys
It's more the case that NTFS is case-sensitive, but the Win32 APIs aren't.

------
UnoriginalGuy
It is possible, although rare, for Windows Explorer to get out of sync with
what exists on the file system or virtual filesystem(s). The refresh button
re-acquires the data from the source and re-draws the result for the user.

For example, if you open a network share, delete a file using another machine
that file might take between several seconds to a minute to disappear visually
(although if you try to use the file you'll get an error and it will refresh
removing it). You can alternatively use the refresh button to get an updated
view instantly.

It is mostly useful with non-standard virtual file system services rather than
the normal NTFS/FAT32 file systems Windows uses.

~~~
tarikozket
I understand but isn't it very odd to give end-user a button like that? Also,
why Mac OS didn't have one?

~~~
UnoriginalGuy
OS X indeed lacks it, and it is a pain in the butt to some:

[http://osxdaily.com/2013/08/30/refreshing-finder-windows-
in-...](http://osxdaily.com/2013/08/30/refreshing-finder-windows-in-mac-os-x/)

[http://apple.stackexchange.com/questions/60119/how-does-
the-...](http://apple.stackexchange.com/questions/60119/how-does-the-finder-
refresh-in-os-x-mountain-lion)

As you can see people have to come up with quirky workarounds to force refresh
a folder on OS X, rather than just clicking a context menu button helpfully
provided.

Others have created third party software to add it:

[http://www.macupdate.com/app/mac/24714/refresh-
finder](http://www.macupdate.com/app/mac/24714/refresh-finder)

This has 46,000 downloads.

Both Windows and OS X fall out of sync for similar reasons: sometimes bugs,
sometimes refreshing is slow/expensive so is done infrequently (e.g. over a
network), and sometimes third party software providing "virtual" file system
elements are terrible.

I don't really find the concept of a refresh button odd at all. But that's
only because I've seen how many virtual file system providers these systems
support and how quirky some of them are. If all they supported is native files
on traditional file systems attached via reliable buses, then a refresh button
wouldn't be required.

~~~
userbinator
Interesting contrast of design philosophy:

Mac - "It just works. We refuse to believe that it doesn't."

Windows - "It mostly works, but when it doesn't, press this button."

~~~
Retra
For a company so self-infatuated with design, they sure did a great job making
Finder a frustrating and near-useless piece of software.

~~~
juliangregorian
One would be either infatuated with design or infatuated by the self, "self-
infatuated with design" does not make sense.

~~~
Retra
"Infatuated with the image of the self as a designer" is what I meant. Self-
infatuation with a design component.

------
michaelt
Back in Windows 98 there was a feature called 'Active Desktop' that could use
web pages as desktop wallpaper (or partial desktop wallpaper). It was intended
to be an early version of desktop widgets like stock tickers. As these were
basically web pages, you could refresh for the same reasons you might refresh
in a web browser.

As you could execute javascript it was also possible to do things like change
your desktop wallpaper when you resized or rotated your screen. But active
desktop was never heavily used enough to have all the bugs in it sorted out -
if you widget's javascript tried to display a message box you could trigger a
crash, for example.

I assume that feature is gone now - but presumably you can still put files on
the desktop, so presumably there's a refresh button in case you have some
strange configuration like your desktop folder mounted from a network share.

~~~
eterm
Also it had horrible performance. Even without any active desktop content,
just having it enabled was enough to make any desktop interaction painfully
slow compared to having it disabled.

~~~
kuschku
Most interestingly, the widgets from Windows Vista and 7 are just normal
webpages, very similar to chrome extensions, actually.

------
gusmd
Like other people said, it is about refreshing the view for changes that
didn't trigger an automatic refresh.

If you dig the details, behind the scenes an API called ReadDirectoryChangesW
is called, which uses a notification-like system to report changes within a
directory. However, that API is weird, so various types of changes are not
correctly reported and explorer.exe is stuck with outdated data. The refresh
forces it to update the view.

Disclaimer: I've had to use that API recently to code a simple python file
monitor in Windows.
[https://github.com/gusmd/vigil.py](https://github.com/gusmd/vigil.py) in case
anyone is interested.

~~~
userbinator
From the documentation: [https://msdn.microsoft.com/en-
us/library/windows/desktop/aa3...](https://msdn.microsoft.com/en-
us/library/windows/desktop/aa365465\(v=vs.85\).aspx)

 _If number of bytes transferred is zero, the buffer was too small to provide
detailed information on all the changes that occurred in the directory or
subtree. In this case, you should compute the changes by enumerating the
directory or subtree._

I suppose that's the case when Explorer gives up, because for this to work it
would require keeping a copy of all the directory contents to compare with,
and "enumerating" would be unacceptably slow.

------
jdub
To add to the comments about file listings not refreshing, note that the
desktop is just a fancy-looking Explorer file listing widget ("control" in
Windows-speak).

~~~
Stratoscope
It's also worth noting that the standard File Open and File Save dialogs are
full-fledged File Explorer windows too.

I make use of this all the time. For example, I often want to open the same
file in two different editors. So in the editor where I have the file already
open, I do a Save As to get into the dialog, then simply drag the file
directly from that dialog into the other editor, and close the dialog without
saving.

Alt+D also works the same in these dialogs as an Explorer window, so a quick
way to copy the current file's directory to the clipboard is to do a Save As,
Alt+D, Ctrl+C, Esc.

Or to open a standalone File Explorer window somewhere in my current project:
Save As, right-click the folder in the Save As dialog, and Open in New Window.

All kinds of nice shortcuts like this are available once you realize that the
File dialogs are Explorer windows.

------
fzn
I'll add, "behaviour of Windows regarding floppy disk drives".

~~~
Theodores
Correct! Windows didn't have networks properly until Win 95. So FDD status is
the origin. Macs could eject floppies, PC's didn't have this.

------
nness
Could be relevant for users on network connections which don't update state?
But on the desktop explicitly, certainly seems odd.

~~~
TeMPOraL
It isn't. Sometimes you have a folder open and another program creates a file
in it; Explorer may not update your display for another 30 seconds or so, so
you can force the update with refresh.

------
FollowSteph3
If you ever work on two computers over a shared network drive with Macs
working in the exact same folder you'll immediately know the answer to this
question ;) I don't understand why every system doesn't have one.

------
Kluny
I use it when I do a Subversion update. TortoiseSVN puts a red icon on non-
current folders and a green icon on up-to-date folders. Sometimes the icon
doesn't change color when you update though, so you have to refresh.

------
GnarfGnarf
I wish Tortoise/SVN responded to F5/Refresh :o(

------
snehesht
it's there to force-render any changes made on the user-interface
(explorer.exe, desktop) that aren't rendered properly.

------
jammi
It's basically a workaround for a feature that never worked properly on
windows: filesystem events in fs viewer apps.

------
EvilBanshee
To keep the non-technophiles occupied while they wait for their external
device to be detected, and to soothe them by giving them something to do
(repeatedly) to "speed up" their ageing computer.

~~~
chrisBob
You are getting a lot of down votes, but the truth is that this behavior is
very common in some cultures, and not all of HN may have seen it before.

When I get impatient I just swirl the mouse in a small counter-clockwise
circle, but I have seen others do the rapid right click, refresh sequence. It
was mostly Asian computer users[0], and some of them had practiced it enough
that they would do this 3-4 times per second while waiting for the computer to
react.

[0] I first noticed this in Iraq, but the Chinese students at school do the
same thing.

------
mahe_d
In the past when CRT monitors were in usage,the ui needs to be painted on the
screen.The crt technology refreshes screen so that pixels can work properly.If
they are not refreshed,then some pixels become 'dead'.

~~~
aaronem
That happens at a much, _much_ lower level than we're talking about here.

