I have lymphedema so swelling is always a problem for me. When I was pregnant it was awful, the swelling didn't stop at my ankles, by time I finally had my daughter my legs were swollen up to my hips. Not fun, this is what I was told
First off would be to cut back on as much salt intake as possible.
If you drink soda, stop or at least limit it to 12 oz a day.
Drink lots and lots of water (which always made me laugh, drink water so you won't retain it)
Prop your feet up any chance you get. I was lucky and for the most part had a sit down job. Near the end of my pregnancy, my boss was extra sure to make sure I got as much time at my desk as possible, you may think aww that's nice. But not really, she knew that my doc was starting to get concerned with the swelling and was afraid I would have to go on bed rest, and she wanted me at the office.
I really advise against the compression socks. When I had localized swelling in my left leg they gave me a compression sock that only went to my knee. The result was the swelling was pushed into my knee and cut off the blood supply in a major artery. That sent a signal to my brain that I wasn't getting enough blood, so it opened up all the blood vessels in my face and upper body. I was at work, turned bright red and nearly passed out. Everybody thought I was having a stroke, because after the vessels started to constrict again, it made my face tight and I had some issues talking. Luckily it passes quickly, but it was not a good experience.