How to Embed Playwright Headless Browser into a website?
Hi team, I'm using playwright to render websites in Server-side to extract the web elements such as HTML, CSS and JS and serve these elements to an iframe that is embedded into my web app, the problem is that the iFrame is causing me a lot of problems due to the fact that many websites are restricting their websites to open in iframe due to security reasons (not the same origin). I'm wondering what would be the alternative to serving these resources into the iframe? is it possible to run the complete headless browser as part of a web page without the iframe? please help!
Thanks for all your effort and great work.
Regards Sam
Iframe is just like a page so it should be not cause any issue. U can directly use SSR . Is there any code we can see so we can suggest it? Regarding website restricting that shouldn't be issue i think because u can always proxy them ?
Hi Shirshak, how can I reach you on Discord? do you have availability to work on a side project? I tried to look for your account in Discord "shirshak9166" but it says the account is incorrect.
@sameh81 sorry it is mighty_soft_tofu#9166.
is it possible to run the complete headless browser as part of a web page without the iframe?
@sameh81 this wouldn't be possible - browsers require low-level OS api's that are not available in the web platform.
I'm wondering what would be the alternative to serving these resources into the iframe?
This is probably too generic question to answer here.. And it doesn't relate to playwright. I'd recommend asking this on Stackoverflow instead.
@shirshak55 , thanks, inhale added you to discord, looking forward to chat with you