Re: Simple JavaScript XMPP client example

"Hund, Johannes" <[email protected]>
Newsgroups gmane.network.jabber.devel
Message-ID <C271054E16F8474D9104E1146C767BF12D2026@DEFTHW99EK1MSX.ww902.siemens.net>
Yes, file:// and same origin policy is really a  PITA and caused a lot of gray hair so far.

My preferred toolbox for this:
Node: nws (npm install –g nws ) : nws –o will also spawn a browser
Python: python –m SimpleHttpServer
Or (preferred) use an html editor with live preview, such as brackets – spawns up a server and live-linked browser with a mouseclick.

I didn’t know of tape, but seems useful as well.

BR Johannes


Von: JDev [mailto:[email protected]] Im Auftrag von Chris Fortmüller
Gesendet: Freitag, 5. September 2014 11:23
An: Jabber/XMPP software development list
Betreff: Re: [jdev] Simple JavaScript XMPP client example

Yep, I meant file:///<file:///\\>. Just saw tape as well, will use that for now! Thanks

On Fri, Sep 5, 2014 at 8:51 AM, Dave Cridland <[email protected]<mailto:[email protected]>> wrote:
On 4 September 2014 23:05, Chris Fortmüller <[email protected]<mailto:[email protected]>> wrote:
Ok, so I have experimented a bit more, and as Steven said, if I host the code on a server, the code works, but if I just access it locally, the code does not work. I still don't quite understand why. If I access the code locally from my machine, and then try to connect to a server on the web, the domain where the code is hosted (my local machine) and the server domain are different, but this is also the case if I host the code on a server and try to connect to a server in another domain, which does work. So I don't quite understand what is the problem then when I access the code locally


By "locally", do you mean file://<file:///\\>? I reckon the browser folk broke file:// completely for almost anything useful.

Jack Moffit wrote a thing called Tape years back to handle problems like this - a microserver for development you can run quickly out of any directory. There's Node based stuff for this kind of thing too.

Dave.

_______________________________________________
JDev mailing list
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: [email protected]<mailto:[email protected]>
_______________________________________________

_______________________________________________
JDev mailing list
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: [email protected]
_______________________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.