Removing ads in a website mirror
Being online, a few utilities allow you to block adverts and popups but it is not so easy offline.
If AdBlock Plus for Mozilla or Firefox is not efficient enough once filters have been set, you will have to modify the HTML code.
If AdBlock Plus for Mozilla or Firefox is not efficient enough once filters have been set, you will have to modify the HTML code.
In a site capture, there are a few methods to get rid of ads and banners blocking page display or forcing you to click when you want to read another page:
- the most risky is to delete all the absolute references (deleting "http://" or replacing http:// by #) in the whole capture with Inforapid search and replace or any find and replace utility.
When these absolute references are calculated by a javascript function, you can replace them ('ht'+'tp:// with '# for fastclick.com v1.4). - another is to delete all the "popups". Replace window.open by windowopen or anything the javascript interpreter does not understand.
- you can also delete references to partner sites either by modifying scan rules or by using inforapid search and replace.
Search for the tag "iframe" or its calculated form ('<ifr'+'ame for example) in html or js files, look for the link or linked image (a href="http and/or src="http) and replace them in all the site files (for example by a href="#http and src="#http) with Inforapid.
Any calculation and any combination with " or ' can be found.
- you can also look for the js files with the javascript functions displaying the adverts. Once found, you just have to rename them.
- also efficient is the renaming of the javascript functions in external files or in all the html pages of the mirror.
- sometimes the javascript function of partner sites can be removed with inforapid search and replace.