When visiting the webpage with the following iframe, the HTML file is downloaded as a file instead of just displaying on the page within the iframe. Why is it downloading and how can it be embedded correctly within a webpage?
<iframe scrolling="no" src="https://example.com/files/example.htm" width="780" height="1400"></iframe>
If it helps to know, the file is being stored in Azure Storage as a blob:
<iframe scrolling="no" src="https://aerccgrsuatpnoapoddat01.blob.core.windows.net/pnoa/html/00460522-001.htm" width="780" height="1400"></iframe>
Please try to set the Content-type
of the blob as text/html
. Then in my side, I can see it works in iframe.
The steps as below:
Nav to azure portal -> your storage account -> Storage Explorer(preview) -> blob container -> your blob container -> right click the .htm file, and select properties -> Then set Content-type
to text/html
. -> click save button.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With