在页面加载期间,有许多文档本身及其必需品的HTTP请求。如何挂钩它们,检索目标URL并阻止在满足某些条件时发送请求?插件也可以发出HTTP请求,我也想覆盖它们。
答案 0 :(得分:0)
有多种方法可以发布重定向:
* Server-side: You configure your web server to issue a 300 HTTP response code (most commonly 301 ("moved permanently") or 302 ("found"/"moved temporarily")), with a Location header set to the new URL.
* Client-side: You include the http-equiv="refresh" attribute in the meta tag or set the JavaScript window.location object (with or without the replace() method) in the head of the HTML document.