jsfiddle / jsfiddle-users

Discussions, issues and docs for JSFiddle.
https://jsfiddle.net
314 stars 114 forks source link

cant embed jsfiddle #1890

Closed Joco27 closed 2 months ago

Joco27 commented 2 months ago

Hi,

I have a simple webpage and I want to embed this: https://jsfiddle.net/b2h59kq7/embedded/ to an iframe(this is just my test fiddle) Is it possible? I have an old webpage and there my old fiddles are still working...

Thx.

oskarkrawczyk commented 2 months ago

@Joco27 To be honest I don't know what is the issue you're having - why can't you embed your fiddle? Are you reporting a bug? Or is this a question? To which I can answer: Yes, you can embed a fiddle on your website using an iframe or a script.

Just click this button:

Screenshot 2024-09-23 at 18 08 23

Joco27 commented 2 months ago

Hi,

Thx for the response! I clicked on the embed button, added to html and have this: Refused to display 'https://jsfiddle.net/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

oskarkrawczyk commented 2 months ago

@Joco27 Just tested on a random fiddle, I was able to embed it, in rendered on a 3rd party domain without a problem.

Tested in Safari, Chrome, Firefox.

Do you have a website online I can test your embed and see if I get the same problem?

Joco27 commented 2 months ago

Not live yet... maybe a server issue! thx

oskarkrawczyk commented 2 months ago

Or you're testing on localhost which can cause such issues.