Put the cucumber slices in a large bowl. Sprinkle with salt. Cover with ice and cold water. Let sit for 6 hours, adding ice and stirring occasionally. Drain thoroughly.
In a large nonreactive pot, combine the vinegar, sugar, water, mustard seeds, peppercorns, garlic, and allspice. Stir to dissolve the sugar. Bring to a boil; cook for 5 minutes. Add the cucumbers and onions; remove from the heat. Stir with a wooden spoon for 1 to 2 minutes. Let cool for about 15 minutes.
Fill each of the hot sterilized pint-size preserving jars with cucumbers and onions, dividing them evenly, and enough of the liquid to come within 1/2 inch of the top. With a clean damp towel, wipe the rim and fit with a hot lid. Tightly screw on the metal ring. Process in a hot-water bath for 15 minutes.
Using tongs, remove the jars, place on a towel, and let cool. Test the seals. Tighten the rings. Store in a cool dry place. Let age for at least 2 weeks before using.
Yield: 8 pints