At certain points when I'm writing, I need to do research and will end up getting distracted by shiny things online. That's the risk you take when you decide to interrupt your writing in order to look something up. The alternative is to make a note in the margin (e.g.: * Research medieval sword fighting!) and skip ahead to the next scene, then do your research when you have free time. Personally, I'd rather do the research as it's necessary, so I can come back and write the scene accurately, instead of skipping forward and leaving the scene undone. If I get distracted and waste some time online, well, chances are good that I needed a break anyway.
But then, I'm self-employed and write for a living, so I have all day in which to write and do research. If I had only had a short period in which to write each day, I might do things differently. Also, I don't do well with self-imposed word count goals. I simply write as much as I can when I'm in the mood, and when I'm not in the mood, I do other things . . . like research, outlining, searching for new ideas, revising older works, etc.