HTML5 Server-Sent Events
HTML5 Server-Sent Events
SSE
demo
https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_sse
https://www.w3schools.com/html/html5_serversentevents.asp
<!DOCTYPE html>
<html>
<body>
<h1>Getting server updates</h1>
<div id="result"></div>
<script>
if(typeof(EventSource) !== "undefined") {
var source = new EventSource("demo_sse.php");
source.onmessage = function(event) {
document.getElementById("result").innerHTML += event.data + "<br>";
};
} else {
document.getElementById("result").innerHTML = "Sorry, your browser does not support server-sent events...";
}
</script>
</body>
</html>
HTML5 media tags
https://www.w3schools.com/html/default.asp
video, audio, picture,
object, embed, figure, source, track,
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/11909253.html
未经授权禁止转载,违者必究!