Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » HTML-CSS-PHP-JavaScript / JavaScript Codes » Secure Your Web Pages To Be Embedded Via HTML FRAMES

Secure Your Web Pages To Be Embedded Via HTML FRAMES

Are you fed up of having your website trapped in some other site’s frame? This article provides a few methods whereby you can provide your visitors with a simple way to break out of the frame.

Using either of the examples below will automatically break a browser out of any frame that links to your page. Keep in mind that some web services such as services that translate your web page into another language may no longer work because of the need of a frame.

If a visitor comes to your site and is looking through frames, this script will automatically make the page ‘break out’ of frames. As an added bonus, it’s only 8 lines of script!

Note: Some services such as website translation and Google images may use frames to display your content. If you break out of the frames these services may also break.

Now there are many snippet available online or on many others Blog and website but every one is not able to optimize your blog or website so your need some optimized code snippet. So now checkout out code snippet for your blog and website that will give you all features for your desired code. Now grab the ready to use code and paste it where you want.

Table of Contents

Recommended For You:
Stylish Bottom Navigation Bar Using HTML CSS & JavaScript


1.) No JQuery File Added.
2.) Pure Little JavaScript Code Added.
3.) No CSS Added.
4.) Simple And Fast Loading Snippet.
5.) Can Work With Any Browser.

How To Add In A WebPage OR Blog?

1.) Just Go To Your “Web Page File” or “Blog”.
2.) Now “Copy” The Below Codes And “Paste” It To There Positions.

<script type="text/javascript">
if (window != top) top.location.href = location.href;


<script type="text/javascript">
if (top.location != location) { top.location.href = location.href; }


1.) You do not have to change anything. Rest can ask for customization.
Note: Users who have JavaScript disabled will not be taken out of a frame using this method.

Last Words:

That’s all we have. If you have any problem with this code in your template then feel free to contact us with full explanation of your problem. We will reply you as time allow to us. Don’t forget to share this with your friends so they can also take benefit from it and leave your precious feedback in our comment form below. Happy blogging, See you in next article…

You Like It, Please Share This Recipe With Your Friends Using...

Be the first to write a comment.

Leave a Reply

Your email address will not be published. Required fields are marked *