幾種網頁跳轉方式

1. 在<html><head>...</head></html>內加入<meta>
<meta http-equiv="refresh" content="1;url="http://3ctipsmemo.blogspot.tw" />
content 為指定要經過幾秒跳轉,並跳轉到何url網址

2. 在<html>...</html> 內加入 javascript程式碼
<script>setTimeout(function(){document.location.href= http://3ctipsmemo.blogspot.tw},1000)</script>
用setTimeout 指定暫停幾毫秒後跳轉location.href至網址

自動更新頁面方法
parent.FrameID.location.reload()  /* 若有 frame 設定並指定 frame id */
window.opener.location.reload() /* 在子視窗更新上層父視窗頁面 */

或利用 history
history.go(0)
或更改document URL環境變數值指定為現在頁面,形成更新
document.URL=location.href
以上皆需包裹在<script></script> 標籤內


3. PHP 利用 header 需設定於<html>...</html>之外
<?php
  header("refresh:1;url:http://3ctipsmemo.blogspot.tw");
?>
設定1秒後更新網頁至目標 url



參考
https://www.w3schools.com/jsref/met_win_settimeout.asp

這個網誌中的熱門文章

Upgrade php and httpd(apache) on CentOS 7

Installing VMware workstation pro on Ubuntu 22.X (Jammy Jellyfish)