July 26, 2010

Avoiding Frames inside Frames

In January I wrote about putting your blog in an inline frame. I did that with this blog on a couple of pages including my Civil War Field Trips homepage. (You'll need to scroll down that page to see it, and I coded it to show only posts tagged "Civil War.")

If I clicked on a link in this blog from the framed page, the link opened inside the frame, perhaps inadvertently framing someone else's website, which is not a good thing since it can cause confusion and even charges of copyright infringement. Plus I could create a situation of multiple frames nested inside each other by clicking on a link back to my Civil War homepage and scrolling down to the inline frame which would then appear inside the other frame! You might have to see it to imagine how messy it gets but guess what? You won't see it here because I found a "fix:"
Within the [Head], put the following:
If you know HTML, you'll find that pretty simple to add to a regular page. In Blogger, you edit your template through your Dashboard. You click Design and then click Edit HTML. If you haven't done a lot of that before, you should probably save a copy of your template before changing the [Head].

There are also codes to prevent your site from being framed at all, but since I want to be able to display my blog on my other sites, I'm not concerned with that here.

No comments:

Post a Comment

The View from Squirrel Ridge features thousands of views of the Shenandoah Valley and surrounding area. I post frequently so please visit often.

Your comments are appreciated. If you are responding to a post older than a few days, your comment will be held until we have a chance to approve it. Thanks for your patience!

Sorry, anonymous comments cannot be accepted because of the large number of spam comments that come in that way. Also, links that are ads will be deleted.