swearing at referees will always be a problem until referees chose to deal with it properly. and that means red card
I should perhaps point out that swearing, in and of itself, has not been an offence since 1997. Since the "great rewrite" of that year, the primary consideration is whether the words are "offensive, insulting or abusive."
To me, it's generally more important to consider the manner in which the language is used, who it's directed at, what the overall tone is (and so on) than which actual words were uttered.
For one thing, which particular words or language are considered offensive by their very nature can vary over time, according to context, geographical location etc. For instance, the word "cheat" would not be considered highly offensive to most people in a day-to-day context but directed at a referee in a game of football, it is.
Another example - "bloody" was once considered highly obscene in the UK but is now considered a fairly mild expletive. In the US on the other hand, it has never been seen as particularly offensive, as far as I am aware. The "f" word seems to be be used more and more frequently these days (including in newspapers, on TV etc) so it may be headed the same way as "bloody" though it's obviously not there yet.
Overall, I wasn't a big fan of the USSF's now discontinued Advice to Referees document but I have to admit it was something of a curate's egg (good in parts). One of the parts of it that I did like, was the following section on evaluating OFFINABUS:
The referee should judge offensive, insulting, or abusive language according to its content, the extent to which the language can be heard by others beyond the immediate vicinity of the player, and whether the language is directed at officials, opponents, or teammates.