Legislation that will give individuals the right to find out what information online companies collect on them has narrowly passed the Illinois Senate.

Under the new law, companies would be required to post contact information for consumers interested in making an inquiry and respond within 30 days.

Failure to comply could result in prosecution by the state attorney general or state’s attorney.

Republicans critics say the plan would overburden businesses while doing little to protect consumers.

The tech industry has almost universally opposed the proposal as well.

California passed a similar law in 2005.