Live data from Hacker News

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

news.ycombinator.com

21–30 of 47 posts

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

#21
post #19

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…

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.

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

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

#22
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.

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

#23
post #9

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

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.

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

#26

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 fi…

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.

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

#27

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 fi…

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.

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 :).

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

#29

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 fi…

The most common use I have of the refresh feature is to observe the sizes of output files (e.g. logs) from a process to see their growth.

If you have a process that creates a file and then writes e.g. several KB to it every few seconds, without doing anything you'll just see the file created with a size of 0. Eventually it does move from 0 but if you want to see the current size you need to refresh.

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

#30
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 in case anyone is interested.

Post reply on HN