homepage Welcome to WebmasterWorld Guest from 54.204.94.228
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
JavaScript framebuster
...that is browser history tolerant
rpking




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

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




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

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




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

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




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

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




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

>>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




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

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! :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved