Next time you get asked, "What's your current salary?" in a job interview, check your ZIP code. It is now illegal for employers to ask job applicants about their previous salaries in at least eight states and eight counties and cities.

The laws and ordinances passed in the past two years are aimed at narrowing the persistent pay gap between men and women. A prospective employer who knows your current salary can offer you a pay bump based on that figure — or keep your new salary low. If you're a woman, you likely make less in your current job than a male recruit with the same skills and experience.

An employer can offer a woman a pay bump for a new job and still pay her less than a man.

"We're seeing tremendous momentum behind the idea of banning questions about prior salary," says Vicki Shabo, vice president of the National Partnership for Women and Families, which advocates state pay-history bans. "It's a specific, very actionable thing that can be put in place in a proactive way. and helps to stop the cycle of systemic wage disparities."

Prohibiting salary-history questions probably benefits managerial and professional job candidates the most, Shabo said. But it also will benefit people who might have moved from a low-cost region to a more competitive market, or who took time off from work. "That's a lot of people in an era where caregiving is common, where migration is common."

Even proponents of eliminating the question, however, aren't sure whether wage-history bans will help close the gender pay gap. Business groups including chambers of commerce and the Society for Human Resource Management oppose the bans. Some economists think it could backfire on the women it is supposed to help. And two states, Wisconsin and Michigan, have enacted laws designed to pre-empt salary-history bans.

Across all occupations, women working full time earn about 82 percent of what men do, according to the Institute for Women's Policy Research, a social science research institute.

It's a disadvantage that follows women throughout their careers, said Mary Pollock, a government relations coordinator for the Michigan chapter of the American Association of University Women. They're not basing starting salaries on experience, she said.

"A lot of them want to find out the cheapest they can get an employee for, so they offer a bit more than the person is currently making," Pollock said. And getting a lowball starting salary "goes right into how much Social Security you have, and how much 401(k) you have, and how much pension you have."

Causes of the gender pay gap range from discrimination to women taking time off from work for caregiving and raising children, and negotiating less aggressively for raises.

Massachusetts enacted the first salary-history ban in 2016. Oregon, California, New York, Delaware, Vermont and Connecticut followed, as has Puerto Rico. New Jersey bans public employers from asking about previous salaries. The Hawaii Legislature passed a ban proposal and sent it to the governor. Republican Gov. Bruce Rauner of Illinois vetoed a ban last year, but the Legislature revived similar legislation this year.

To its proponents, a ban on asking the previous salary question makes intuitive sense.

"So many of us have been in the position of having to respond to that question," said Andrea Johnson, senior counsel for state policy at the National Women's Law Center. "It's also an easy fix."