There are two meanings attached to ‘however’. One is ‘on the other hand’ or ‘having said that’, and the other is ‘no matter how’. This means that you need to put a comma after ‘however’ or it will read as ‘no matter how’. If you put a comma before it too, it becomes an aside, which isn’t always what is intended. Consider these sentences:
‘I like cats, however, I like dogs more.’
The author means that although they like cats, they prefer dogs. But ‘however, I like dogs more’ could stand as an independent clause and so the first comma isn’t strong enough to bear it (creating a comma splice). All of the sentences below make sense, although they have different meanings. The first two convey what the author intended in the first place.
I like cats; however, I…