LOS ANGELES-The methods Facebook uses to thwart ad-blocking technology have been criticised by web developers.

The social network injects dozens of lines of code in every page to make it harder for ad blockers to detect and hide sponsored posts.

But that makes the website less efficient and stops software such as screen readers used by visually impaired users from working properly.

The BBC has contacted Facebook for comment.

In order to block advertising, developers look for patterns in a website’s code that can be consistently identified and hidden.

It would be easy for a plug-in to spot the word “sponsored” or to find a container labelled “ad” inside the webpage code, so companies, including Facebook, use coding tricks to obfuscate their ads.

The tricks Facebook uses to fool ad-blocking plug-ins include:

Facebook provides some controls for users to influence the ads they see.

“Although you can’t opt out of seeing ads entirely, you can influence the types of ads you see by giving us feedback or hiding ads and advertisers that you don’t want to see,” it says in its help centre.

Developers working on the uBlock Origin browser plug-in have been documenting their counter-measures on coding site Github.