1 Reply Latest reply on Apr 4, 2008 4:06 PM by ntsiii

    Automatic Browser Reloads

    Crossed_Wires
      I am looking for a way to have the browser reload automagically when a file changes, mostly for unit testing. It's not a big deal, it is just that I am getting tired of having compile my flexunit unit tester do-dad, then switch over to the browser, then press refresh. I would rather just leave the browser in the corner, and have it refresh automagically, only paging over to it when I actually want to look at something within it. Basically, I would like one of two things to happen.
      1) The browser notes that that the file underneath is different than the one in history, and it reloads said file. I suppose file changes could be noted by looking at timestamps on files, or by writing random data to the file name (or presumably some parts of its content) and comparing it to the "current" version. And no, before you say it, I don't care that this is inefficient, I am perfectly comfortable letting my computer seek like once a second or so in order to read the status of a file.
      2) Somehow, after re-compiling my unit test, a command is then issued to the browser that says "hey, refresh so and so page". This would be pretty neat.

      So, if anyone has any ideas about how to do this, or even better, has a solution to this problem, I would appreciate it. I suppose I should mention that I use firefox 2.0.0.13 at the moment, on ubuntu (7.10) linux. Thanks for your time.
        • 1. Re: Automatic Browser Reloads
          ntsiii Level 3
          Don't bother with the modified checks. I think the browser will handle that for you.

          Just make a javascript timer the continually reloads the url. Have a mouse move evnet block the reload when you are actually working with the app.

          I've done some this but don't have any code handy. But it was not too difficult.

          We programmers are a pretty lazy lot when it comes to repetitive tasks. You know you are talking about saving two clicks, right?

          Tracy