View Full Version : Disabling javascript automatically on my site

02-15-2007, 09:18 PM
I need to be able to automatically turn off javascript on certain parts of my site so that when I'm using a frame to look at another site the javascript is disabled. Is there a way to do this like they do with web proxies on proxy.org? thanks

02-15-2007, 11:31 PM
you cant control the content of other sites. if you could, the web would be in anarchy. and using javascript to disable javascript is retar... redundant. the sites can use javascript to break out of frames.

sorry, but its impossible.

02-15-2007, 11:39 PM
well then how do web proxies do it

02-16-2007, 01:35 AM
Web Proxies are able to disable javascript because they are coded by PHP which downloads the webpage and can edit the html anyway they feel possible before displaying to the browser. I would guess they make the proxy add "<noscript> tags around the entire contents of the webpage.

12-23-2009, 05:05 PM
I also want to do the same like I m getting some one site and want that javascript add not shown on my site but did not get its solution first

12-23-2009, 07:38 PM
The only way to do this is to use php (or another serverside language) to get the contents of a remote page. This is nothing like iframes-- this is your server getting the files from another server, then forwarding them to you. That's how a proxy works.
But then you want to actually modify the contents of those pages. That's possible and in theory simple-- get the contents in PHP (etc) then search and replace any parts you don't like. For example, you could try to remove all <script..... tag blocks.
Will it work? Perhaps. Will it be easy to guess at what sort of content may or may not be on another site? No, not at all.
There is no standard "way" for this because there is no real "solution", but instead just ways to attempt to make it work.