Does nativescript have http2 support? - nativescript

I'd like to understand whether http2 is supported with the current http nativescript library?
I understand that nsurlsession for iOS supports http2 but I'm not sure how it works for Android. I do know that okhttp supports http2.
Is anybody using http2 with nativescript?
Thanks for your help.

Can you not just use https://www.npmjs.com/package/http2?
Disclaimer: I've never tried it yet myself in nativescript

Related

Angular Universal - get to know client OS

I wonder is there any way to get to know what is client OS in order I could render different images for desktops(1600px of width), tablets(1366px) and phones(736px)?
You can use the below mentioned npm package for it:
Device Detector for Angular
Also the demo for same is being given at:
Demo for Device Detector Angular
You can get the data from the HTTP Request Header user-agent and then from your server serve the passing data.

How to setup Feathersjs with Nativescript

I have made a simple backend with feathersjs for testing purposes.
For mobile application I am using nativescript with (angular 5). But one of the feathersjs client library require socketio-client.
socket.io-client library fails in nativescript.
So I used following nativescript plugins ( none of them works with featherSocketIOClient )
nativescript-socket.io
nativescript-socketio
Please help.
You do not have to use Feathers on the client to connect to a Feathers server.
refer to the documentation

Coldfusion websocket security error [duplicate]

Can someone using CF10 confirm if CF10 supports secure websocket wss://?
http://blog.kaazing.com/2012/02/28/html5-websocket-security-is-strong/
I checked with Hemant. The answer is no, it is NOT supported now, but it is under progress to be added.
On the basis of there being not a single mention of "secure websocket" or "wss" in the CF10 docs (according to Google), and in all the blogging Ray Camden has done on the topic there is not a single mention of it either, and indeed the only relevant match on all of Google for "cf10 wss" is back to this very question, I would say "no".
But that would be rather an odd implementation omission, I think.
I just tried hacking this on the websocketChannel.js file where the URL is created (line 18)
var lURL="ws://"+(_7e0)+":"+_cf_websocket_port+"/cfusion"+"/cfusion";
tried to do this
var lURL= (location.protocol === "https:" ? "wss" : "ws") + "://"+(_7e0)+":"+_cf_websocket_port+"/cfusion"+"/cfusion";
But alas the wss:// connection would just never connect. BS I tell you .. pure BS!! The only issue really is with IE10 as it will not connect to an unsecured websocket channel initiated from a secure page.
No it is not supported yet. However, it is being considered for
ColdFusion Splendor.
https://twitter.com/rakshithn/status/352722362799624193

WebWorkers and WebSockets with Firefox

I'm trying to implement a working WebSocket connection within a WebWorker. That should be simple and it is if I use Chrome as b rowser. However, since this experiment should further become part of a production I need it to work on all the great Browsers, namely also Firefox.
My problem is that I can't get it working with Firefox. At first Firefox wasn't able to create a WebWorker. That was a Bug and is fixed with version 9. But now it seems that it wouldn't be able to create a WebSocket within the Worker.
I tried the following line of code:
var ws = new WebSocket(url);
which fails with:
WebSocket is not defined
Well, according to this it should work. But it doesn't, neither within the WebWorker nor outside of this context. I tried the older
var ws = new MozWebSocket(url);
which seems to work outside of the WebWorker but I get the same error as above within it.
Now, what's the problem? I know WebSockets where disabled byy default in some older versions but version 9 should support a similar functionality as Chrome (at least that's what they say on their side). So am I doing something wrong?
Im using Ubuntu 11.10 and did not test other browsers yet.
Thanks in advance!
There's no support for WebSocket in workers in Firefox yet. See https://bugzilla.mozilla.org/show_bug.cgi?id=504553
Update: Firefox 35 added support.

Firefox WebSockets

I've read somewhere that the trunk version of Firefox already had a WebSocket implementation. Nevertheless, I've just tried the 3.7a4pre without success. It still
gives me the old "WebSocket is not defined" error message. Am I confused with WebWorkers?
Using a flash-based WebSocket implementation is not an option.
Please advice.
According to bug 472529 a patch has not yet been applied to trunk.
WebSocket (both the API and the wire protocol) are still in draft, so we're a way off yet.
Using a flash-based WebSocket implementation is not an option.
I'm afraid a fallback (Flash, Java, XMLHttpRequest long-polling etc.) is your only option in Firefox for now. The only browser that currently has native WebSocket is Chrome.
WebSockets has been just landed on Firefox trunk.
WebSockets disabled in Opera and Firefox 4: http://hacks.mozilla.org/2010/12/websockets-disabled-in-firefox-4/
They are called MozWebSockets on Firefox since v4
Check out the Mozilla Websocket Reference
Since Firefox supports WebSockets not strictly to official standards it had prefix "Moz", so you have to check if WebSocket is existing object, if yes use it, if no check MozWebSocket, if yes, then use it.
Since Firefox 11, they do support WebSockets without prefix, so it is the same as in Chrome now.

Resources