Smart Tech Mukesh
219 subscribers
26 photos
2 videos
1 file
17 links
Smart Tech Mukesh provides help and guidance to people in a variety of fields including blogging, coding, digital marketing, affiliate marketing and many more.

Visit Our Website:

Join Our Group: @smarttechmukeshgroup
Download Telegram
This media is not supported in your browser
Let’s honor the brave hearts who fought for our freedom. Happy Independence Day 🇮🇳
Happy Krishna Janmashtami
May this Vishwakarma Puja or Lord Vishwakarma Puja bring you everything you desire and everything you dream of. May success accompany you in every step that you take.

Happy Vishwakarma Puja 🚩🔥💫
New Option Added in Blogger
Protect Website from Iframe
Smart Tech Mukesh
Protect Website from Iframe
JavaScript Code:
// Check if the page is loaded inside an iframe
if (window.self !== {

// This code will run if the page is inside an iframe
alert("This website cannot be embedded in an iframe. You will be redirected.");

// Redirect to the specified URL = '';

Here's a description of the code:
1. <script>...</script>: This is a JavaScript code block that is placed within the <body> of the HTML document. It runs when the page loads.

2. JavaScript Code:
    -window.self !== This condition checks whether the current page is loaded inside an <iframe>. window.self refers to the current window, and refers to the top-level window. If they are not the same, it means the page is inside an <iframe> because the top-level window and the current window are different when inside an <iframe>.
   - alert(...): If the condition is met (i.e., the page is inside an <iframe>), this code displays an alert message with the text "This website cannot be embedded in an iframe. You will be redirected."

3. = '';: After displaying the alert message, this line of code redirects the user's browser to the specified URL ( by setting the property.

The purpose of this code is to detect if the page is loaded inside an <iframe>. If it is, it displays an alert to inform the user that embedding the website in an <iframe> is not allowed and then redirects the user to a specified URL. This approach helps protect your website's content from being displayed within an <iframe> on another website.
Now 1 More Options Added In Blogger