What did I make at my last job? None of your business

How long will it take to close the gender pay gap?
How long will it take to close the gender pay gap?

The most dreaded question in a job interview could soon be off limits.

States and cities across the country are considering legislation that would bar employers from asking about a job applicant's pay history. Massachusetts and Philadelphia already have such laws on the books, and a New York City initiative is sitting on Mayor Bill de Blasio's desk.

Twenty-two other states are considering similar measures, from California to Georgia and Vermont, according to the National Conference of State Legislatures.

Such initiatives aim to target the gender pay gap. Women earned 79.6 cents for every dollar men made in 2015, according to data released by the Census Bureau last year.

Proponents say questions about salary history reinforce unfair wages throughout a woman's career.

"If companies are basing an offer on what people are making, they're automatically putting women at a disadvantage, because there's likely to be a pay gap," said Dawn Lyon, vice president of corporate affairs at jobs site Glassdoor. "They may lowball an offer."

Plus, women are less likely to negotiate a raise, according to a 2016 Glassdoor study, which found that 68% of women did not negotiate their salary versus 52% of men.

Related: 5 things to know about the gender pay gap

Employers generally base compensation on a salary range that can be adjusted "based on years of experience, skills and qualifications," said Mike Aitken, head of government affairs for the Society for Human Resource Management.

But it's still common for them to ask for pay data, Aitken said. Companies either want to manage an applicant's expectations, or gauge what competitors are coughing up. And past wages are a handy benchmark.

Lyon said that leaves room for unconscious bias to kick in.

"It's important for everyone to have a level playing field," she said. "The job should be the job."

De Blasio worked closely with the city council on the New York City measure and is widely expected to sign it. But such initiatives aren't without controversy.

The Chamber of Commerce for Greater Philadelphia has challenged that city's new pay history law in federal court.

"The Ordinance makes searching for and recruiting top talent more difficult, which makes businesses in Philadelphia less competitive," the group said in a statement.

Still, lawyers are advising companies that hire in New York City to start preparing for the ban.

"You can't just go in and change your policies overnight," said Maria Caceres-Boneau, a lawyer with Littler Mendelson who represents employers.

Firms should start removing questions about salary history from their applications and begin retraining all employees who take part in the hiring process, she said.

Personal Finance

CNNMoney Sponsors