Jump to content

Showing downloaded html file within an iframe and getting 403 response


Liam88
 Share

Recommended Posts

I'm hoping someone may be able to guide on this.

One of my side projects stores ads for ecommerce brands for inspiration. I want to now add in their landing pages.

I have used SingleFile to get a download of a page and then uploaded it to the page as a file.

I am then looking to output as an iframe with the expectation this won't interfere with any css/html on my page.

This leads to a basic output of this

<iframe src='<?=$page->landing_page_html?>' width='100%' height='600px'></iframe>

However, I'm getting a 403 response on the page. Does anyone have any guidance if my method is on the right path or should I leave this for another?

I'm guessing it's wrong as no other site like awwwards or say Shopify templates do this and lean on a screenshot that links to the page.

I have attached an example file for context.

Big thank you in advance.

image.thumb.png.759cd1ccf665a6a46621b0f738be9a5b.png

Collagenic Burn Elite – Obvi (11_04_2024 17_38_24).html

Link to comment
Share on other sites

I have some ideas here but they would make things even worse.

I can imagine that it's nice to have a real page included and scroll around in it BUT... there so many downsides and probably legal issues here.

Maybe rethink the idea and either only save those ads or make screenshots like everyone else.

Link to comment
Share on other sites

2 hours ago, wbmnfktr said:

I have some ideas here but they would make things even worse.

I can imagine that it's nice to have a real page included and scroll around in it BUT... there so many downsides and probably legal issues here.

Maybe rethink the idea and either only save those ads or make screenshots like everyone else.

Yeah the purpose is to have a page but without the function. However, it will still adjust to device etc.

Like you said, I may need to rethink it as I can't find distinct yes or no's on this usage. 

Link to comment
Share on other sites

On 4/12/2024 at 11:47 AM, Liam88 said:

I was able to get it to work within a basic index.html file and referencing the file in an iframe. I'm guessing it's due to server settings then.

@Liam88

Check your header settings, maybe is set to deny  https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

Do you really want to use iframe? It's obsolete.

Link to comment
Share on other sites

42 minutes ago, Matzn said:

@Liam88

Check your header settings, maybe is set to deny  https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

Do you really want to use iframe? It's obsolete.

I'd prefer to not use iframe but when searching it was flagged as the best option. 

 

Any suggestions instead of iframe. I'm not a dev so just learn as I go, so any direction to go would be appreciated. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...