[ic] Ask Jeeves frames - secure page issue

Jon Jensen jon at endpoint.com
Sat Aug 28 16:47:20 EDT 2004

On Sat, 28 Aug 2004, John1 wrote:

> > You can use simple JavaScript code on your pages to break out of a
> > frame:
> >
> > http://www.thesitewizard.com/archive/framebreak.shtml
> >
> Thanks a lot for thesitewizard link Jon!  I've implemented the JavaScript
> suggestion and it works a treat.  :-)
> I am actually a little nervous about using JavaScript - there seem to be
> sooo many sites out there that contain broken JavaScript - so often I get
> the pop-up box "A runtime error has occured - Do you wish to debug" even on
> seemingly well designed sites.  This has just put me off using JavaScript as
> I have assumed that it can't be relied upon to run smoothly on different
> browser platforms.  Is this a reasonable concern, or is it just me?  :-)

JavaScript as simple as this is nothing to worry about. Browsers I'm
familiar with don't show JavaScript errors by default anyway, so users 
wouldn't see anything amiss if your code malfunctioned (they'd just remain 
in a frame if they were in one).

> I assume that as long as I surround any JavaScript with <!-- the script -->
> then the web pages should still *always* display without a problem in
> browsers where JavaScript has been disabled - is this a fair assumption?

Yes. Even without the comment marks, modern browsers won't show JavaScript
code even if they have JavaScript disabled.

> If JavaScript is disabled will the <BODY onload="breakout_of_frame()">
> cause a problem?

No. Unrecognized HTML attributed will be ignored by even the most ancient

> Also, should I be worried about the performance impact of running a
> breakout_of_frame script when *each* page is loaded?  On a modern PC are we
> talking about micro-seconds or milli-seconds to run a small onload
> JavaScript?

Nothing to worry about for a tiny script like that, even on a 10-year-old 

> Also, if I put the scipts in a scripts.js file, will the browser cache
> the js file?


> Similarly, is there much of a performance overhead to running mod_rewrite?

No. Effectively none for a few simple rules.

Of course you can test speed with and without mod_rewrite yourself 
with a tool like ApacheBench (ab).


Jon Jensen
End Point Corporation
Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ...

More information about the interchange-users mailing list