<p><a href="https://www.google.co.jp/">Google.co.jp</a></p>
If there was an HTML file frame.html
like the one above, I read it in the HTML below.
<html>
<iframe src="frame.html"></frame>
</html>
Then the link will be displayed, but when you click it, the blank will be blank.
How can I avoid it?
The reason why the page appears blank is because you are trying to display google.co.jp in a frame.
The google.co.jp page has SAMEORIGIN configured in the X-Frame-Options header and cannot be viewed in frames from another domain.
Because of this, it will be displayed white and difficult to avoid.
I think it can be displayed in browsers that do not support the X-Frame-Options header, but I think most browsers these days are already supported.
The X-Frame-Options header can be found at the following location in Chrome's Developer tools:
The X-Frame-Options header can be found at the following URL:
https://developer.mozilla.org/ja/docs/Web/HTTP/X-Frame-Options
© 2024 OneMinuteCode. All rights reserved.