can i send message from chrome extension to java server ? - javascript

so my question is I want build chrome extension to send message to java server should I use XmlHttpRequest API in chrome extension and java should be HTTP server?

It should be noted that Chrome, Firefox, Opera and Safari all use the XMLHttpRequest2 object. While Internet Explorer uses the similar XDomainRequest object, which works in much the same way as its XMLHttpRequest counterpart, but adds additional security precautions.
You will first need to create the appropriate request object.
Check out the steps here: https://www.nczonline.net/blog/2010/05/25/cross-domain-ajax-with-cross-origin-resource-sharing/

Related

chrome.webRequest and safari

I'm trying to port a Chrome/Firefox extension for Safari. But the extension use a lot a feature of those browsers that doesn't seem to exist in Safari : chrome.webRequest (https://developer.chrome.com/extensions/webRequest).
The chrome.webRequest let you get information about every http requests sent (event from others tabs.).
I know that Safari has a very basic safari.application.addEventListener for navigate and beforeNavigatebut Chrome give a lot more information (like responseHeaders) and other events (like onBeforeRedirect or onErrorOccurred).
Is there a way to achieve that with pure js or with the safari js-extension API ?

Intercept HTTP request via Internet Explorer extension

I need your help.
I'm developing an IE extension and it must get information about every outcome HTTP request done from the IE. Is it possible?
For example, in Chrome it can be achieved with chrome.webRequest, in Firefox - with httpObserver, but I have not found a way to do it in IE extension.
Is it possible?
Thanks!
I think what you are looking for is
HttpListener
There is more to read about it on MSDN:
https://msdn.microsoft.com/en-us/library/system.net.httplistener(v=vs.110).aspx

How to do a Cross-Domain AJAX request in IE8 with Chrome Frame

I've got an application that needs to support IE8 (with Google Chrome Frame), that will make cross-domain requests. I understand regular IE8 makes use of XDomainRequest for these calls, but when using Chrome Frame and looking through the console, I don't see XDomainRequest listed in the window object.
Since I'm using Chrome Frame, I understand I'm using the Chrome JavaScript engine... but does this mean I should be able to use XMLHTTPRequest for CORS? When I try that, I get a cross-domain error in the console.
Can someone clarify how this should be working? I'm confused.
IE 8 doesn't support CORS, but you can look into JSONP if you're only doing Get requests. There are however a few security concerns with JSONP though.
Another approach is doing a reverse proxy which means you create a page/service on your own domain that in turn makes the request to the other domain. This gets around the cross domain issue since the browser requests a resource on your domain.

Internet Explorer 7/8 cross-origin resource sharing JavaScript implementation

Upon submitting a form from my website to third-party website, the HTTP post request will trigger downloading a file. This works fine with Firefox and Chrome. However, Internet Explorer 7/8 security setting prevent downloading the file by saying:
file download blocked - To help protect your security Internet Explorer blocked this site from downloading files to your computer
I know this is a issue with CORS, which has been resolved in IE 9+, FF and Chrome. right now I need to support IE 8 bypassing the security setting. Is there any workaround I can do here? So basically what CORE does is to add a HTTP header request so that the server knows this is a request from different domain.
IF you search for the CORS solution for IE 7/8 you will have to use a XDomainRequest. For IE 10+ browsers they have changed it to use XMLHTTPRequest. Have a look at following link to get a idea about CORS using XDR.
http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
http://amareswar.blogspot.com/2012/06/cors-issues-with-ie9-and-workarounds.html

chrome:// like URLs in Internet Explorer

once again, I'm struggling with porting a Firefox extension to Internet Explorer 7, 8 and 9.
My most recent problem is that the FF extension code makes heavy use of AJAX calls to "chrome://..." urls (it fetches .html files that way and then displays the HTML on the page).
Is there any way in IE to access "chrome://"-like URLs? Or - more generally - is there any way I can make an AJAX call to retrieve contents of a HTML file that is a part of the extension (and is not accessible online)?
Thanks a lot!
Tom
You want the res:// scheme. This doc is .net specific, but it gives you the basics of how the protocol is used.

Categories

Resources