Nov 23, 2009

Avoid Frames

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Programming > Scripting > JavaScript

Avoid Frames

TavoxPeru
Everyone knows that by using FRAMES (HTML FRAME or IFRAME tags) anyone can include the contents of a page into another, but there are situations in which these are done without any authorization from its creators, well, if this happens to you and you want to avoid these cases, you can use the following simple javascript function:

CODE
<body onload="if (window.self!=window.top) top.location=self.location;">

Best regards,

Comment/Reply (w/o sign-up)

Atomic0
The only places that still uses frames these days are:
a) really old sites created in the days before CSS was available or widely used;
cool.gif Google cached pages, showing cache pages beneath the Google header;
c) Google Translate, showing the translated page beneath the translation options and Google header;
d) tutorial search engine sites, when linking to external tutorials on third-party servers.

Although I understand why you would want to 'break' your site out of frames on other sites, most of these sites already have an option to remove or close the frame.

Comment/Reply (w/o sign-up)

Quatrux
I agree that frames were something for the old days, when most of people couldn't use PHP or other programming/scripting languages for their sites, having frames for menus, sidebars was a logical way to do it, to not include all the same stuff in the html. I know some sites still use frames, but it's a matter of habit, because people who used them in the past quite often, still might use them, because they think it's ok, same with using tables in html, new users which learn html today usually use CSS, I personally still use tables if I want to and I just need a result and not a "better" html structure, the main thing it works on most browsers, where using only divs and CSS does not work as I want to on some browsers.. tongue.gif

Comment/Reply (w/o sign-up)

HannahI
Is there a way to do that, but let some frame it?
Anyways, nice. cool.gif

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)


See Also,

*SIMILAR VIDEOS*
Searching Video's for Avoid, Frames
advertisement



Avoid Frames

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com