
Tagged: iframe
-
AuthorPosts
-
June 4, 2025 at 9:52 am #1485073
The client wish is to display roundabout 30 Kitchens, that are sold in a portal called https://www.kleinanzeigen.de. One solution to integrate this listing in the current website is to display a gallery of portfolios and there realize it with an iFrame. Another: solve it with a plugin or something similar.
1) How is it possible to integrate a responsive iFrame without issues – I didn´t succeed with the following code – it crashes the website complete?
2) And the other problem is that browsers doesn´t allow the display of iFrames. How to solve this?
3) Or is it possible to integrate directly the adverts via plugin/other solution?IFRAME EXAMPLE
<div class="container"><iframe class="responsive-iframe" src="https://www.kleinanzeigen.de/s-anzeige/moderne-doppelhaushaelfte-mit-keller-in-ruhiger-lage-kueche-geschenkt-/3077951470-208-6482"></iframe></div>
CSS
/***** RESPONSIVE IFRAME *****/ .container { position: relative; overflow: hidden; width: 100%; padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */ } /* Then style the iframe to fit in the container div with full height and width */ .responsive-iframe { position: absolute; top: 0; left: 0; bottom: 0; right: 0; width: 100%; height: 100%; }
June 4, 2025 at 1:04 pm #1485075Es wird so nicht funktionieren. Man könnte sogar auf deiner Seite das in einer Lightbox aufrufen. Hier wäre dann ein Popup vom type:’ajax’ nützlich. – Leider hängt das Einbinden von externen Seite sehr davon ab, was die abgefragte Seite für Sicherheiten eingerichtet hat:
Fehlermeldung ist dann z.B.:
Quellübergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf https://www.kleinanzeigen.de/s-anzeige/moderne-doppelhaushaelfte-mit-keller-in-ruhiger-lage-kueche-geschenkt-/3077951470-208-6482/. (Grund: CORS-Kopfzeile ‘Access-Control-Allow-Origin’ fehlt). Statuscode: 403. 2
Das kannst Du eben nicht beeinflussen. Auch ich richte meist auf meinen Seiten genau das ein, das niemand die Seite einbinden kann.
via htaccess bei apache Servern.Die gegenseite müsste dann deiner Seite erlauben:
Header set Access-Control-Allow-Origin "https://deine-domain.de"
Wenn man via iframe eine Seite einbinden will muss die Gegenseite die X-Frame-Options für dich erlauben
bzw. : moderner den CSP Header so einrichten, das die Seite als frame-ancestor gelistet ist.Also – wenn es denn Eure Bilder sind – lade die auf deiner Seite hoch und gestalte dann mit Enfold deine Galerie
June 6, 2025 at 3:55 pm #1485152Danke dir.
Ich gehe zu recht davon aus, dass ich das Portal “kleinanzeigen” nicht dazu bringen werde, das zu ändern.
Noch zur Frage:
Gibt es ein Plugin, dass Listings von externen Portalen in die Website einbinden kann?
Or is it possible to integrate directly the adverts via plugin/other solution? -
AuthorPosts
- You must be logged in to reply to this topic.