2011-04-16 58 views
2

在頁面加載過程中,文檔本身及其必備條件有多少個HTTP請求。我如何掛鉤它們,檢索目標URL並防止在某些條件滿足時發送請求?插件也可以發出HTTP請求,我也想要覆蓋它們。使用Firefox插件進行URL過濾

+1

嘿採取看這可能是你https://developer.mozilla.org/en/XUL_School/Intercepting_Page_Loads#HTTP_Observers – Aditya 2011-04-16 16:33:05

+0

有用@Aditya,似乎是正確的觀察員類型的工作,謝謝! – user422039 2011-04-16 16:41:47

+0

查看我對這個問題的回答:http://stackoverflow.com/questions/5205672/modify-url-before-loading-page-in-firefox – 2011-04-16 21:37:04

回答

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. 
+0

「Firefox附加組件」 – user422039 2011-04-16 16:21:14