JavaScript To stop ClickJacking, which one is more secure? breaking out of iframe vs X-Frame-Options to Deny or Same Origin

To prevent clickjacking from happenning for your website, I have noticed several different methods. Some use javascript to have your website break out of iframe, the other soltution is to set the X-FRAME-OPTIONS header to DENY or SAMEORIGIN. Which one of the 2 method I mentioned do you think is more secure? Here is a sample page I am using to test clickjacking.

<HTML>
<BODY>
<H1>Clickjacking Test</H1>
<IFRAME SRC="http://www.google.com/" HEIGHT="500" WIDTH="500"></IFRAME>
</BODY>
</HTML>

With iframe break code you will see Firefox and Safari will be slow to get out of Iframe, meaning you will see Clickjacking test and then it will break out of that iframe and show the original website. With IE and Chrome it is fast that not noticeable. But with X-Frame-Optiions solution you simply do not see your website at all. It will be blocked. Like with google in the above example. So my questions is which one of the solution better? Blocking it completely or breaking out of iframe(slow in 2 browsers)

Answer:1

I get the value 17.000, 17 thousands. var pay = document.getElementbyId("name").InnerHTML; alert(pay); it shows "17.000". But if I do like this: var f = (pay * 24); alert(f); it shows 408, not ...

I get the value 17.000, 17 thousands. var pay = document.getElementbyId("name").InnerHTML; alert(pay); it shows "17.000". But if I do like this: var f = (pay * 24); alert(f); it shows 408, not ...

  1. working with math and medications quizlet
  2. working with math
  3. working with math in php
  4. working with math and medications
  5. working with math module in python
  6. working with math variables
  7. working with formulas math
  8. jobs working with math
  9. working with the math balance
  10. working with sets math
  11. working with units math
  12. working with powers math
  13. mathantics working with parts
  14. working with money math
  15. working with numbers math
  16. python working with math
  17. working with sequences math
  18. working math problems
  19. working math model
  20. working math problems online

Basically, i'm building a game. In my game I wan't the players to be able to speak with each other. You have a figure, and when you speak, your text goes in a speak bubble div over your character. My ...

Basically, i'm building a game. In my game I wan't the players to be able to speak with each other. You have a figure, and when you speak, your text goes in a speak bubble div over your character. My ...

I am new to bootstrap. I am making an sidebar accordion navigation using data-toggle="collapse" but it closes the navigation by default. what should i do to open navigation by default and it get close ...

I am new to bootstrap. I am making an sidebar accordion navigation using data-toggle="collapse" but it closes the navigation by default. what should i do to open navigation by default and it get close ...

I am wondering if it's possible to detect words input. I have 2 options: The word to be written in an input, and at Enter press to fire a certain command like animate or go to url. The word to be ...

I am wondering if it's possible to detect words input. I have 2 options: The word to be written in an input, and at Enter press to fire a certain command like animate or go to url. The word to be ...