Forum Moderators: open
My question is this: is there anyway to completely disable javascript redirects on a website that you own?
The problem I have is more nuanced than your response implies. It's well known that scareware etc. is making it through even reputable ad networks like MTV, BET, Technorati, AddOn etc.
See this for background:
[voices.washingtonpost.com...]
So it's impossible for me to remove all of my ad networks because they are all legit ad networks. I'm trying to put on a little self-reliance and take care of the problem myself.
So does anyone have any ideas for me rather than giving me a lecture?
If you wish to sanitize third party code before including it in your page, you can have a proxy running on your server. Essentially it fetches the third party code, removes certain strings (probably using a variety of regular expression matches), and then sends the new code to your page. You could use PHP or any other server-side language to accomplish this.
You may run afoul with the third party site if you modify their code in this way, depending on the license agreement you have with them, so this may not be an option. (For example, Google Adsense doesn't allow this.)
HTH :)
Back to the technical stuff...are you saying that even though the ads are served through javascript, php could be used to filter?