Redirect to SRC, when IFRAME is loaded directly


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <script type="text/javascript">
  2. var url = 'YOUR_FACEBOOK_FAN_PAGE_URL'
  3. if(top === self) {
  4. top.location.href = url;
  5. }
  6. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.