Welcome to WebmasterWorld Guest from 54.145.39.186

Forum Moderators: phranque

Message Too Old, No Replies

JavaScript framebuster

...that is browser history tolerant

     

rpking

1:25 pm on Oct 30, 2000 (gmt 0)

10+ Year Member



Has anyone found or cunningly devised a bit of JavaScript that breaks out of a frameset, whilst maintaining browser history.

That is, does not cause the back button to annoyingly keep redirecting to the page you are on, but also doesn't just disable the back button.

I've messed around with loads of combinations of location.replace etc, but no success.

I think I could do it if it is possible to change the browser history?...

tedster

8:53 am on Oct 31, 2000 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Here's [grizzlyweb.com] a script that says it will do what you want. The page offers two versions of framebuster code. Version 1 -- the longer one -- maintains an intuitive history list.

By the way, I was thinking about your "wish" to be able to change browser history -- that would certainly open some outrageous security holes, wouldn't it! Sort of like my pet wish to be able to view a browser window's history when someone visits. Not gonna happen, I'm pretty sure.

I probably wouldn't like what other sites would think up to do to me in such a world anyway.
[marker rcjordan frames js]

Edited by: rcjordan

rpking

9:13 am on Oct 31, 2000 (gmt 0)

10+ Year Member



Cheers for the link, but each of these scripts create the different problems I am aiming to avoid.

The first clears the history, therefore greying out the back button.

The second causes the really annoying bouncing behaviour.

I'd love to have no impact at all on the back button's use. Any page that fiddles with it just winds me up no end.

eljefe3

11:15 am on Oct 31, 2000 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Javascript.com had quite a few of these type of scripts. Now with their new look and redesign, I can't find them even when doing a search for "framebusting". All their categories have been moved around. It might be in security, but I can't say for sure.
If you come across what you're looking for, please post a followup.

Thanks.

tedster

1:09 pm on Oct 31, 2000 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



>>The first clears the history, therefore greying out the back button<<

I only see that behavior if I just opened a new window and the history list is only 1 location long.

Have you tried something along these lines:

if (parent !== self)
self.parent.location.replace("yourpage")

I just tested it in Netscape Communicator 4.7 and Explorer 5.5 -- it works on this machine.

rpking

1:20 pm on Oct 31, 2000 (gmt 0)

10+ Year Member



Nice one!

I made the schoolboy error of trying to maintain a browser history that wasn't there.

Fantastic, that's being bugging me for days! :)

 

Featured Threads

Hot Threads This Week

Hot Threads This Month