Versioning in SharePoint when editing in Word compared to Word Online

While I was developing a workflow to be triggered on a changed Document Library item in SharePoint Online (this was a Word document), I noticed something interesting about the versioning.
In the workflow I was checking if the version number had already increased, thinking that in this way I could determine if the user was done editing.

As it turns out, it depends if you are using Word or Word Online. What happens is this:
If you are using your local MS Word installation, then you are basically working offline. You only connect to SharePoint Online when you take an explicit action like saving or checking-in a document. SharePoint will not create a new version in the version history until you click Save in Word. So even if you type lots of new text and update some properties, but close the document without saving, nothing is changed in the version history.

This is very different in Word Online. As you probably know, there is no Save button in Word Online, because any change is automatically saved for you. So that made me wonder: if I edit a document in Word Online for half an hour, making many changes, then that document is going to be saved automatically dozens of times. So does that create dozens of new versions in the history? Well, that would be awkward and luckily the answer is no.

What happens is that Word Online creates a new version in the version history (in SharePoint Online) when the first change is being saved in Word Online. So as long as you don’t touch anything in Word Online and just read the document, you get no new version. Then, on every next change in the document that is saved in Word Online, that same new version is *updated*. You can see the Modified time change in the version history.
That is actually the same behavior that we are used to in (local) Word: as long as you do not close the document, subsequent saves will be considered as an update to the same version. This is true if you use both minor and major versions, but also if you only use major versions.

So coming back to my workflow, the downside here is that a new version in the history does not always mean that the user explicitly saved his work. That depends if Word Online or (local) Word was used. Your new version will in any case appear in your version history more quickly when using Word Online.