eire web design home page contact eire-web design eire web design and development site map
stepping on in business
• Don’t get framed

Don’t get framed



Recently I came across a website that  was displaying one of my pages in their own frame set which made it difficult to store the shopping cart session and was breaking the website functionality as well.

The solution was a small piece of Javascript added between the HEAD tags to remove all frames:


This script checks to see if the current page is the “top” page. If it is not, it tells the web browser to load the current web page as the top, thus wiping out any frames. Of course, this script won’t work with browsers that don’t understand scripting, or where scripting is turned off, but the script will work on most browsers, and that makes it a pretty effective deterrent

Share and Enjoy:
  • Digg
  • del.icio.us
  • blogmarks
  • Reddit
  • StumbleUpon
  • Technorati
  • Blogosphere News
  • Facebook
  • Google Bookmarks
  • Mixx
  • MySpace
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • LinkedIn
This entry was posted on Monday, October 15th, 2007 at 11:12 am and is filed under JavaScript. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


  • Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Links...

Chicklets...
  • http://www.eire-webdesign.ie/blog/feed/
    http://www.eire-webdesign.ie/blog/feed/
    Google Reader or Homepage
    Add to My Yahoo!
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    add to msn
    Add to My AOL
    Add to Technorati Favorites!
    pageflakes
    windows live