lol, began, as short for laughing out loud, a written form to indicate emotion.
becoming popular around 1990 or early 90s.
during the time, alternative is often <grin> and :D
the latter called emoticon
emoticons, is a direct precursor of emoji
back then, the use of emoticons, is debated.
some feel, it is very helpful, to indicate mood, among texts.
while others, usually hard core nerds, such as grammarians the elite unix hacker ilk, are against.
because they believe, English should not be mutilated with such botched punctuation, that you can properly express emotions in English, and you are to master English, not crippled by pictographs.
but as time goes on, emoticon became widely popular like wild fire, unstoppable, because, one, most people are not English masters or academics, they are never gonna learn the fine skill of using English to express subtilties. Two, the emoticon, do serve as practical and functional indication of mood in online text. To express them in English, is just cumbersome, even for English masters.
so, emoticon prevailed.
the most famous, being the smiley :)
countless magazines, newspapers, has thrown in their 2 cents on this issue.
note that these are printed magazines and physical paper of newspaper. as internet wasn't there yet.
by y2k, emoticon is universally accepted. you wouldn't find a person debating about its use.
the expression lol, basically rode the same way thru 1990s.
in particular popular in “instant messages”, such as American Online Messenger, Microsoft MSN Messenger, etc.
by 2005, facebook, reddit, hackernews, etc came into being.
and “instant messagers” are dying out.
and, we must not forget 4chan. It came into being and became hugely popular.
there, the LOL, become extremely popular.
also, during this time, is the thriving of online gaming.
so, LOL, became every gamer's lexicon.
this is when, the meaning of lol, aka laughing it out, start to mutate.
now, as lol became rampant, it start to experience a change of meaning, as people habitually type out lol even when they did not laugh, or, in response to a friend's unfunny funnies but dully reflexed LOL.
this habitual lol started to change its meaning, into a trite reaction, as in, lol but not lol.
and it began to pickup ironic sense, or even derogatory, as in, a forced pro forma laughing out loud. as you would smile when seeing your boss, or as you mumble thank you to the clerk at a food shop