|
svakanda
|
 |
« on: June 30, 2009, 09:36:12 AM » |
|
This snippet pretty effectively trashes your iframes... if (top.location != location) { top.location.href = document.location.href ; } I am sure there must be a way to combat that. Anyone have any suggestions? I know pretty much zero javascript. thanks!
|
|
|
|
|
Logged
|
a ship is safe in the harbor, but that's not what it's for.
|
|
|
|
vsloathe
|
 |
« Reply #1 on: June 30, 2009, 09:55:33 AM » |
|
Easy way with IE: var top.location = function(){ return null; }
Then there is another way that works 100% but it will stop all other js on the page after the attempted framebreak from loading.
|
|
|
|
|
Logged
|
hai
|
|
|
|
svakanda
|
 |
« Reply #2 on: June 30, 2009, 11:06:01 AM » |
|
Can you show me that one too VS? That sounds preferable to me actually.
thanks so much! J
|
|
|
|
|
Logged
|
a ship is safe in the harbor, but that's not what it's for.
|
|
|
|
svakanda
|
 |
« Reply #3 on: September 30, 2009, 01:34:06 AM » |
|
Doesn't appear to work with IE8 & this framebreaker... if(top.location!=location){top.location.href=document.location.href;} Maybe I need to go find some IE 6/7 to test with. Is there a good way I can get those without having to like...validate and all that shit?
|
|
|
|
|
Logged
|
a ship is safe in the harbor, but that's not what it's for.
|
|
|
|
nop_90
|
 |
« Reply #4 on: September 30, 2009, 04:11:16 AM » |
|
top = null; window = null; document = null; 
|
|
|
|
|
Logged
|
|
|
|
|
vsloathe
|
 |
« Reply #5 on: September 30, 2009, 06:19:47 AM » |
|
You need a script that sends a 500 something header. I can't remember what it is off the top of my head, but Javascript dies a flaming horrible death when you get an ajax response with this particular header type, which is how you get framebreaker code to keep from executing. The HUGE caveat is that no further JS will execute on the page. At All.
|
|
|
|
|
Logged
|
hai
|
|
|
|
kurdt
|
 |
« Reply #6 on: September 30, 2009, 10:02:30 AM » |
|
You need a script that sends a 500 something header. I can't remember what it is off the top of my head, but Javascript dies a flaming horrible death when you get an ajax response with this particular header type, which is how you get framebreaker code to keep from executing. The HUGE caveat is that no further JS will execute on the page. At All.
You mean 204 No Content? At least I have used that with frame breaker and it works but it cripples the browser nicely. Visitor can't exit from your page and do nothing than close it when he wants to leave 
|
|
|
|
|
Logged
|
I met god and he had nothing to say to me.
|
|
|
|
svakanda
|
 |
« Reply #7 on: September 30, 2009, 11:05:36 AM » |
|
yeah that is my experience too Kurdt, it totally cripples IE, firefox it halts in it's tracks, but it still works. IE prettymuch = dead. I'd prefer if that weren't the case actually.
|
|
|
|
|
Logged
|
a ship is safe in the harbor, but that's not what it's for.
|
|
|
|
vsloathe
|
 |
« Reply #8 on: September 30, 2009, 12:08:12 PM » |
|
Right, the 204 header. That's what I was thinking of.
|
|
|
|
|
Logged
|
hai
|
|
|
|
perkiset
|
 |
« Reply #9 on: September 30, 2009, 12:56:22 PM » |
|
var top.location = function(){ return null; }
Sometimes the simplest shit you come out with is solid gold. Never thought of it this way, really nice VS.
|
|
|
|
« Last Edit: September 30, 2009, 01:22:06 PM by perkiset »
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
vsloathe
|
 |
« Reply #10 on: September 30, 2009, 01:19:36 PM » |
|
/blushes
seriously though remember, that only works in IE! FF is smart enough not to let you redefine the methods of globally accessible objects, hehe.
|
|
|
|
|
Logged
|
hai
|
|
|
|