Stop Iframe

Started on the old forum in April 2012 · view the original in the archive · old links redirect here

12 replies · 984 views · started 14 years ago · 1 min read

6 participants
amitdas333 Junior · 23 posts #1

Hi! Do anyone know how to stop my site to be displayed in an iframe of another site? I found the javascript solution. Is there any better solution??

Mysterio Lead · 630 posts #3

Browsing a site through an iframe cannot be stopped (otherwise except JS). You can still hotlink protect specific file types from cPanel.

mysterio.al - programming is a functional art

StunningNick Junior · 40 posts #5

amitdas333 wrote: Hi! Do anyone know how to stop my site to be displayed in an iframe of another site? I found the javascript solution. Is there any better solution??

PHP WAY

header("X-FRAME-OPTIONS: DENY");

Loony wrote: try and open a iframe to my site then epix.mobi im going out for a sec let me see if u can do it it isnt using JS btw

http://111.118.212.210/~waynickc/xampp/mp3.php

hmm... i guess it really works 😛 try doing it using htaccess works better anyway 😛

Don't think i am bad , i used to be too good one time...

amitdas333 Junior · 23 posts #7

Thanks for all your info. Its better to remove the main cause for which peaple using iframe of my site Adfresh. Now i don't mind if anyone use iframe of my site.

subzero Super moderator Fellow · 3,954 posts #8

Yeah you can stop frames lol ...

Make it load in 2 places means wake up the browser JS aka javascript

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

subzero Super moderator Fellow · 3,954 posts #10

Look at youtube and fine there javascript lol i know they have best coded one out.

function parentIsSameOrigin()
{
    var result = true;
    if (window.parent)
    {
        result = Boolean
        (
            // more precise modifications needed here
            window.this.location.href.indexOf(window.parent.location.href) == 0
        );
    }
    return result;
}

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

something else Fellow · 2,296 posts #11

StunningNick wrote: PHP WAY header("X-FRAME-OPTIONS: DENY");

Browser Lowest version Internet Explorer 8.0 Firefox (Gecko) 3.6.9 (1.9.2.9) Opera 10.50 Safari 4.0 Chrome 4.1.249.1042

using a proxy may also stop this from working mobile browsers may not support this also

amitdas333 wrote: Using javascript to stop iframe is not working in operamini.

Limited javascript on operamini will prevent javascript codes from working against iframes

StunningNick Junior · 40 posts #12

Yep!!!

something else wrote: Browser Lowest version Internet Explorer 8.0 Firefox (Gecko) 3.6.9 (1.9.2.9) Opera 10.50 Safari 4.0 Chrome 4.1.249.1042

using a proxy may also stop this from working mobile browsers may not support this also

Yep!!! this/htaccess or simply X-FRAME-OPTIONS HTTP header will only work with browser(s){version(s)} supporting them & 1 can easily bypass using custom header or either some proxy site(s).

Don't think i am bad , i used to be too good one time...

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close