I disagree with consensus here.
I have contacted two of my exes on the net, and both times with a very positive result.
One of my exes was a guy who wasn't nice to me when we were together, but who I suspected would 'grow up' in time and be nice to somebody else. 15 years later he has done exactly that - he is married with a kid and I had a great chat with him. Both just interested in how life had turned out for the other - I'm really glad I know now, though we won't be emailing again.
The other is a bit more controversial as it was a very passionate 'young love' that I still daydream about from time to time when things not great with DP. Sometimes I used to fantasise that if I had stayed with that ex then I would now be fulfilled etc.
Anyway I contacted him twice, both times he ignored me. So I took that as a 'eff off'. Fair enough. Then, totally at random, I saw him in the street when I was on a shopping trip (he doesn't live in same city as me).
And guess what, he has aged just as I have. He isn't some 19 year old Byronical love god, he is a 35 year old balding guy, average looking, not even that appealing tbh.
I blanked him (although I would like to know how he's doing, not going to embarrass myself considering double knock back on internet) and he saw me, looked amazed, and just stood there. I walked on - legs shaking - right past him and away.
Anyway, upshot is I am now OVER IT, in fact I'm embarrassed I ever gave those silly fantasies the time of day. I have a great DP and although it's not perfect I am so grateful for what I've got.
The grass is not greener, and as the great writer said 'You can't go back'.
Obviously this isn't the same as flirting online but my own policy on flirting is that it's ok as long as it's in moderation and it is mild enough that you wouldn't mind your DP/H doing it too.
If it is something that would upset you if your other half did it, then it's probably not OK.
I don't blame anybody for wondering what their ex is up to after all this time, and with the net, it's just too tempting to resist sometimes.