I am trying to create a widget where it should be able to reuse as iframe on any other website. it works perfectly on same domain. I tried to use it on different domain.
my iframe code is below,
<iframe id="serviceFrameSend" src="https://cyberglo.com/dyacon/dyaconlive/websiteWidget.php?pid=811addd060d7ae73429a831acae7365c&size=large" width="1000" height="1000" frameborder="0"></iframe>
As I said above when I use this on different domain only part of widget is rendering, it has some Ajax request where it load the bottom part of data. when iframe is loaded on different domain that part isn't working.
But surprisingly its working perfectly on Firefox even on different domain. but no luck with chrome and safari.
Maybe its due the doctype or "Content-Security-Policy", I tried everything without any luck.
here is my header file
<?php header("Access-Control-Allow-Origin: *");
include_once 'version.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta charset="utf-8" name="viewport" content="width=400, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content=" default-src * 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline';">
<!-- responsive meta tag -->
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Dyacon Weather Stations</title>
<script src="js/jquery-3.2.1.js"></script>
<script> var sid = <?php echo $stationid;?>; var globals = {};</script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.min.css" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.structure.min.css" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.theme.min.css" type="text/css">
I have added iframe on different domain for texting here
https://noblewebdesign.com/dyacon/widgetTest.php
Your help is really appreciated.