The British cavalry as an institution has been around since before Julius Caesar. The British developed cavalry to a high art, and seldom could a foe stand against heavy cavalry pounding towards them with a forest of sharp lances before them.  When guns came on the scene around the 1500's, the cavalry life started to strain a bit, and the more guns developed, the more infantry could stand against cavalry.  But the cavalry could use guns too, and took to the horse pistol at first

 

British horse pistol


These one shot affairs were smoothbore, difficult to reload especially on horseback, and had little to no range. The horsemen themselves didn't like them and still clung to the sword and lance, even though some realized they would have to change. One of those was Winston Churchill, who rode at the Battle of Omdurman in the Sudan.  When about to charge the dervishes, he put away his sword and brushed off his brand new 10 round Mauser pistol, and did quite well.  Other officers also bought their own Colt revolvers, but the rank and file would still rather butcher their way to glory.

Winston Churchill

Early muzzleloading carbines were tried with some resistance, but justifiably so.  Reloading a single shot muzzle loading carbine was even harder than a small horse pistol, and losing ramrods and primer caps was common.  (All this while your trying to ride someone down and who is also shooting at you).  Breechloaders came on the scene from the 1850's, the first used by Brit's being the Westley Richards Monkey Tail carbine (named for it's odd loading lever) but it still had the capping problem.

 

Monkey Tail carbine


Then the brass boxer cartridge was developed and the Snider carbine was issued, and you would think the cavalry's problems would be solved, but not so, they still preferred their precious swords and lances.  Besides, the Snider would kick like a blue mule, and a dozen shots were all that the typical horseman could stand.  Many didn't even aim for fear of the recoil, and it would have been a wonder if they had actually hit anything.  Things got slightly better with the Martini-Henry, but till the advent of the Lee repeating rifles with smokeless powder ammunition did the cavalry finally have a usable and easily reloadable weapon they could live with.

Not that it would do them any good.  Machine guns were also here to stay, and the infantry had those same repeating rifles.  The day of the cavalry waned, turned to mounted infantry, then morphed into armored cars, and if their spiritual successor is alive today, it's a robotic drone, doing reconnaissance work and the occasional missile strike.  It's a shame, as they did look impressive on parade.

Flowerdew's Squadron

Painting by Alfred Munnings "Charge of Flowerdew's Squadron. Canadian cavalry attack German machine guns in 1918 at Moreuil Wood.  They were annihilated.