Asking applicants for their salary history has been a common part of the hiring process, but depending on where you live, the question could be a thing of the past. That's because laws making it illegal for employers to ask you about your previous pay are gaining momentum.

The argument is that judging an applicant’s worth based on previous salary is likely to perpetuate pay gaps that arise from discrimination — or worse — make it difficult to even be considered.

Hence, that pervasive pay gap. In 2017, women earned 82% of what men earned in the U.S., according to a Pew Research Center analysis.

Based on this estimate, it would take an extra 47 days of work for women to earn what men did in 2017. Why does a gender pay gap exist? Some point to reasons like education or experience differences, but according to Pew, roughly four in 10 women (42%) say they’ve experienced gender discrimination at work, and one in four working women (25%) say they’ve earned less than a man who was doing the same job, whereas only one in 20 working men (5%) say they’ve earned less than a female peer.

Race and ethnicity play a role in the pay gap as well, according to the study. Roughly half of employed black women (53%) say they have experienced at least one type of gender discrimination at work. Fewer white and Hispanic women say the say the same (40% each).

Given the data, laws that could work toward closing the gap would appear to make a lot of sense, but not everyone is on board. Some pro-business groups have claimed that there is no research proving that a ban will work (even though there’s never been a law put in place to begin with).

To see if you live in a state where there is a salary history ban, check out this running list.

Be well-versed in the details before beginning your job search. In the meantime, if you don't live in an area that bans the salary history question, what should you do when it shows up on a job application or is thrown out by a hiring manager during an interview? Here are a few ways to handle the topic:

Be transparent. While you might be tempted to fib, this can backfire on you because your prospective employer can contact your current or former workplaces and ask about your salary history during the reference or background check phase.

Talk 'total compensation.' After your salary reveal, write or say that you’re willing to negotiate when it comes to total compensation, which includes not just your wages but bonuses, vacation days, flextime and other benefits. You're signaling to HR that while you want the job, you also know your worth.

Put your salary in the best light. If you feel your pay was on the low end for your position and your industry, make sure the hiring manager knows this and why: Perhaps you decided to trade off on salary for the opportunity to work for a specific company, or you’re up for a 15% raise next month at your annual review and expect to nail it.