Posted by: yysun on: March 30, 2011
I found myself hitting F5 in IE like crazy. Every time after modified the web files, in order to preview the result, I need F5 to refresh IE.
So, I created a small Windows Forms application that monitors the web site folder (using FileSystemWatcher). When web file changed, it searches all IE browsers that are from the web site. and send key F5 (actually post message via p-invoke).
It works very well especially on two monitors. Saving files on one monitor, browser refreshes on the other.
It is very convenient. After saved the files, I will see the result immediately. It is not only useful for developing UI. It is also great for unit testing.
After modified and saved the tests in the Rabbit Framework, the test runner page refreshes automatically.
I didn’t make it a Visual Studio Plug-in, because I need it when using Visual Studio Express and WebMatrix.