I could ricie myself here pretty good by asking this. but is there anyway to prevent frames from breaking. Examples of how to break them are everywhere, and makes sense.
But a way to stop a foreign page from exiting a frame or at least limit it's chances would be pretty neat. I can both see why there wouldn't be a way to do such a thing, but thought I'd throw it out there.
If a foreign site doesn't want to be trapped in someone elses frames, then you should not try to stop it from breaking out of your frames. If it is possible, I certainly hope other members do not share how to do this.
I have seen one site that used server side processing to bypass simple frame breakers (I have an idea of how they did it but I am not going to provide details).
This would be copyright infringement and would get your site shut down in a heart beat by many ISPs if victim sites complained.
Also remember that in the late 1990's there were a rash of search engine type sites that were framing linked sites with their own ads, etc. Basically they all were sued into ending the practice.
If you want to frame someone else's site, don't go the extra step of trying to stop the other site from breaking out of your frames if they wish. Such tactics are scummy sleazy tactics at best.
I know that it wouldn't be considered a good tactic and I can appreciate if you don't want to share any info.
I'm writing an app that provides search results in a frame view, that opens in a new window. You can see how I run into problems when sites break out of the frames. and as such exit my explorer. I'm providing them a service so that others can rank their site, and send traffic to it, so in this case I don't feel that I'm breaking any 'webmaster code of conduct' or anything like that.
KLB. Thanks for your updated reply. I'm not out to infringe, and that post has 99% made me change my desicion.
I won't be displaying ads, or anything, just the ability to rank the site, and return back to mine.
Basically if a site like mine attempt to break out of your frames, then we don't want to be a part of your "service" and yes it would be bad conduct even if you weren't placing ads. Also some (poorly designed) sites can run into functional problems if they are caught inside of someone else's frames especially if they use frames themselves because it can cause the mistargeting of links, etc.
Yep. Thanks again. These are alot of things that I never thought about before, and I'm glad your giving them to me to flat out.
I've decided to not do it. so we can rename this thread from "prevent frames from breaking" to -> "Reasons not to stop frames from breaking".
Many folks here at SitePoint are always good at being brutally honest. Often times what seems like a good idea on the surface is not so great of an idea once one digs a little and sees the ramifications.
While I agree that a site owner may not want people to actually steal content by opening pages within frames, I will disagree in two ways:
a) A well designed site will always have the owner's data, image, etc... so as a site owner it may even be good that someone includes the site in a frame. It is a way to get more traffic.
b) There are legitimate ways to show third party's sites within another site, particularly in traffic exchanges and other online marketing resources. A site that breaks out of frames disrupts a legitimate TE operation. A traffic exchange, among other web marketing sites, may certainly use a script that stops frame breakers. btw... it is rather simple to stop the most common frame breaking script.
This is just a matter of responsibility.
I know many programmers, Internet users and experts regard online marketers as some kind of "bad guys" (to say the least) but it is still a legitimate business and a millionaire industry.
Enjoy a great day...