During the page load there are number of HTTP requests for document itself and its requisites. How do i hook them, retrieve target URL and prevent request from being sent if certain condition met? Plug-ins can also issue HTTP requests, i would like to cover them too.
Asked
Active
Viewed 581 times
2
-
1Hey take look at this may be helpful for you https://developer.mozilla.org/en/XUL_School/Intercepting_Page_Loads#HTTP_Observers – Aditya Apr 16 '11 at 16:33
-
@Aditya, seems to be right observer type for the job, thanks! – user422039 Apr 16 '11 at 16:41
-
See my answer to this question: http://stackoverflow.com/questions/5205672/modify-url-before-loading-page-in-firefox – Wayne Apr 16 '11 at 21:37
1 Answers
0
There are several ways to issue a redirect:
* 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.