iframe refuses to display
It means that the http server at cw.na1.hgncloud.com
send some http headers to tell web browsers like Chrome to allow iframe loading of that page (https://cw.na1.hgncloud.com/crossmatch/) only from a page hosted on the same domain (cw.na1.hgncloud.com) :
Content-Security-Policy: frame-ancestors 'self' https://cw.na1.hgncloud.com
X-Frame-Options: ALLOW-FROM https://cw.na1.hgncloud.com
You should read that :
- https://developer.mozilla.org/en-US/docs/Web/Security/CSP
- https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
how to block website from loading in iframe?
For modern browser, need to enable X-Frame-Options in Header,
The x-frame-options header can be implement through web server configuration settings.
You can view the X-Frame-Options in Header as like below image,
Reference: https://www.keycdn.com/blog/x-frame-options/
If your browser does not support it, then you will have NO clickjacking defense in place and can use HTTP Header Field X-Frame-Options,
<meta http-equiv="X-Frame-Options" content="deny">
There are three possible values for X-Frame-Options:
DENY -
The page cannot be displayed in a frame, regardless of the site attempting to do so.
SAMEORIGIN -
The page can only be displayed in a frame on the same origin as the page itself.
ALLOW-FROM uri -
The page can only be displayed in a frame on the specified origin.
Why can't I embed a specific URL in an iframe?
By default iframe show in smaller size but if you set the height width it will show your content You can try this:
<html>
<head>
<style>
iframe {
position:absolute;
top:0;
left:0;
width:80%;
height:80%;
}
</style>
</head>
<body>
<iframe src="https://time.my-masjid.com/timingscreen/7695401e-d724-4adb-a188-ed33c2ce886e"></iframe>
</body>
</html>
Related Topics
Horizontal Scrolling with Mouse Wheel in a Div
Display Background Color for The Page & Align Texts at Center
Load External CSS File in Body Tag
Can a: :Before Selector Be Used with a <Textarea>
Writing HTML Form Data to a Txt File Without The Use of a Webserver
How to Center a (Background) Image Within a Div
How to Hide Autofill Safari Icon in Input Field
Link to an Element Within The Current Page
Ckeditor Strips Inline Attributes
Word Wrapping for Button with Specified Width in IE7
Insert HTML Code Inside Svg Text Element
Using: After to Clear Floating Elements
How to Display Text Around Circle. CSS Shape-Outside
Firefox Form Targeting an Iframe Is Opening New Tab
Why Is a Trailing Punctuation Mark Rendered at The Start with Direction:Rtl