ghj / index.html
Srinivasulu kethanaboina
Update index.html
1fb0b11 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gradio Chatbot with Cookies</title>
</head>
<body>
<h1>Gradio Chatbot</h1>
<iframe id="chatbot" src="https://srinukethanaboina-srunu.hf.space" width="100%" height="600px" style="border:none;"></iframe>
<button onclick="printCookies()">Print Cookies</button>
<script>
function printCookies() {
const iframe = document.getElementById('chatbot');
try {
// Access cookies from the iframe (may not work due to same-origin policy)
const iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
console.log("Iframe Cookies:", iframeDocument.cookie);
} catch (e) {
console.error("Unable to access iframe cookies. Possibly due to same-origin policy.");
}
// Access cookies from the main document
console.log("Main Document Cookies:", document.cookie);
}
</script>
</body>
</html>