Rinse the cucumber and remove about 1/8-inch from each end. Now cut 1/4-inch thick slices and put them in a large bowl. Add in the onions and salt, stir thoroughly and cover the bowl with a wet thin towel. Now cover the towel with ice and place the bowl in the refrigerator for about 4 hours.
Take out the bowl and remove the ice. Rinse and drain the cucumber and onion mixture thrice.
Sterilize the jars by placing them in 200°F oven for approximately 10 minutes.
Now take either a 4 qt or 6 qt pot and put the vinegar, sugar, and other spices inside it, before bringing it to a boil on medium heat. After the sugar is dissolved, add in the cucumber and onion mixture and repeat the boiling process.
Using a slotted spoon, add the cucumber from the boiling mixture to the warm jars till a distance of one inch remains to the rim of the jar. Now add in the hot vinegar and sugar syrup till about half an inch remains to the rim and then place the lid on top. Secure the lid tightly and preferably cover it with a metal screw band.