Cross domain javascript to access localhost. Possible?
        Posted  
        
            by Earlz
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Earlz
        
        
        
        Published on 2010-05-18T21:24:20Z
        Indexed on 
            2010/05/18
            21:30 UTC
        
        
        Read the original article
        Hit count: 280
        
JavaScript
|cross-domain
Hello, for one reason or another I need for javascript to access a webserver on the localhost. This localhost webserver is under our control so we can have whatever software running in it.
How would you do this? I've seen things like YQL but this accesses another domain from the internet. This kind of access causes a lot of problems with firewalls and such. So I want to access the same computer that the browser is running on.
How would you do this with javascript and whatever software running on the localhost server?
Also, the javascript is being run from an internet site. And the localhost server will not be running on the same port are the internet website is.
Is this possible to do? I know about the cross-domain restrictions but I've also seen there are ways around them such as YQL. How does something like YQL work? How would you reimplement it?
© Stack Overflow or respective owner