HTTP TCP AND WEB SOCKET

Please correct me if i am wrong. One of the advantage of using HTTP protocol in web application is to minimize the share of server resources between the clients. Even if there are thousands of simultaneous connections, the load on the server is greatly reduced because of this stateless nature of HTTP. On the other hand if the connection was statefull (eg TCP), then server would need to open a

HTTP TCP和WEB SOCKET

如果我错了,请纠正我。 在Web应用程序中使用HTTP协议的优点之一是最大限度地减少客户端之间的服务器资源份额。 即使有数千个同时连接,由于HTTP的这种无状态特性,服务器上的负载也会大大降低。 另一方面,如果连接是有状态的(例如TCP),那么服务器将需要打开并保持数千个请求的连接处于活动状态,从而导致服务器上的巨大负载。 因此,为了让HTTP在Web应用程序中处于无状态,这是一个完美的理解。 我的疑惑是关于Web套

setting up web sockets

When using web sockets all the tutorials I can find talk about the code for the client side. But the server side is just left out. What does the connection url here actually point too? Do I need to also be using PHP, Ruby, node.js or any server side language? var connection = new WebSocket('ws://html5rocks.websocket.org/echo', ['soap', 'xmpp']); Tutorial referenced: http://www.html5rocks.c

设置网络套接字

当使用网络套接字时,我可以找到关于客户端代码的所有教程。 但服务器端只是被遗漏了。 这里的连接网址实际上也指向了什么? 我是否也需要使用PHP,Ruby,node.js或任何服务器端语言? var connection = new WebSocket('ws://html5rocks.websocket.org/echo', ['soap', 'xmpp']); 参考教程: http://www.html5rocks.com/en/tutorials/websockets/basics/ 有一些服务器端语言支持Websockets,我个人推荐使用: Socket.

What's the situation with XSLT and XPATH in modern browsers?

I'm writing javascript code to traverse and manipulate deeply nested XML documents. With modern browsers, is there still a need for crossbrowser libraries like: sarissa ajaxslt As far as I know, without using one of these there won't be any XPath in IE with ActiveX disabled. And a simple wrapper is needed for both XSLT and XPath to distinguish between IE and w3c XML Dom. As long

在现代浏览器中,XSLT和XPATH的情况如何?

我正在编写JavaScript代码来遍历和操作深度嵌套的XML文档。 使用现代浏览器,是否仍然需要crossbrowser库,如: 萨里沙长枪 ajaxslt 据我所知,没有使用其中的一种,禁用ActiveX的IE中将不会有任何XPath。 XSLT和XPath都需要一个简单的包装来区分IE和w3c XML Dom。 只要您坚持使用XSLT 1.0功能,我会说XSL和XPATH支持在所有浏览器上都能很好地工作,即使早于IE6也是如此。 这就是说,客户端XSLT处理(包括直到最近在

Websockets with tornado

I'm relatively new to the tornado framework and so far things have been pretty confusing, especially when dealing with web sockets. So far my code looks like this: import tornado.options import tornado.web import tornado.websocket import tornado.ioloop from tornado.options import options, define define(name='port', default=8000, help='.', type=int) class WSHandler(tornado.websocket.WebSo

龙卷风的Websockets

我对龙卷风框架相对来说比较陌生,迄今为止事情一直很混乱,特别是在处理web套接字时。 到目前为止,我的代码如下所示: import tornado.options import tornado.web import tornado.websocket import tornado.ioloop from tornado.options import options, define define(name='port', default=8000, help='.', type=int) class WSHandler(tornado.websocket.WebSocketHandler): clients = [] def open(self):

Youtube redirecting http to https and using flash player instead of HTML5

I am using the youtube embed to show videos. Using IE11 (also FF28 but not FF27), when I am logged into my google account, the http request gets redirected to https, which isn't a big deal, except that even though I am specifying the html5 player, youtube serves up the flash player. Is there some way to force http or force the html5 player over https? Re-create: Log in to google account

YouTube将http重定向到https并使用Flash Player而不是HTML5

我正在使用嵌入的YouTube来显示视频。 使用IE11(也FF28,但不FF27),当我登录到我的谷歌帐户时,http请求被重定向到https,这是没有什么大不了的,除了即使我指定html5播放器,youtube服务了Flash播放器。 有什么方法来强制HTTP或通过https强制HTML5播放器? 重新创建:登录Google帐户并导航到网址“http://www.youtube.com/embed/u1zgFlCw8Aw?autoplay=1&html5=1”重定向到https和Flash播放器 退出Google帐户并导航

HTML5 framework for both Web and Mobile (LAMP)

Which are the possible options for HTML5 framework which support both web and mobile development. For example, if I have to develop a application for web which is 100% iPad or Android tabs compatible (with touch, slide support) then what should be the ideal choice in LAMP environment. I have heard of Sencha which looks like HTML5 mobile only framework. Please correct me if that's not the

Web和移动(LAMP)的HTML5框架

HTML5框架的哪些可能选项支持Web和移动开发。 例如,如果我必须开发一个兼容100%iPad或Android标签的Web应用程序(带触摸,滑动支持),那么LAMP环境中应该是什么理想选择。 我听说过看起来像HTML5移动设备框架的Sencha。 如果不是这样,请纠正我。 Jquery Mobile是跨浏览器兼容性的绝佳选择。 根据我的经验,它创建了外观漂亮的移动网站和桌面网站。 根据需要调整它可能需要一些调整,但总的来说,我发现它是最好的解

Autocomplete for mobile web apps

Is there a library (like Wink Toolkit, Sencha Touch or jQuery Mobile) that offers autocomplete solutions for web apps out of the box? I need to apologize because I forgot to add its all about a mobile web app. The question is excellent. I'm just currently dealing with the very same design problem. Current auto-complete solutions work very poorly on mobile devices (if at all). Luckily

自动填充移动网络应用程序

是否有一个库(如Wink工具包,Sencha Touch或jQuery Mobile)为开箱即用的Web应用程序提供自动完成解决方案? 我需要道歉,因为我忘记添加关于移动网络应用程序的全部内容。 这个问题很好。 我只是在处理同样的设计问题。 目前的自动完成解决方案在移动设备上运行得非常差(如果有的话)。 幸运的是,有jQuery Mobile,您可以将jQM Autocomplete作为插件 。 另请参阅随附的设计说明。 jQuery UI具有自动完成功能。

Javascript Drag and drop for touch devices

I am looking for a drag & DROP plugin that works on touch devices. I would like similar functionality to the jQuery UI plugin which allows "droppable" elements. The jqtouch plugin supports dragging, but no dropping. Here is drag & drop that only supports iPhone/iPad. Can anyone point me in the direction of a drag & drop plugin that works on android/ios? ...Or it mi

JavaScript拖放触摸设备

我正在寻找一款适用于触控设备的拖拽式DROP插件。 我希望类似于jQuery UI插件的功能,它允许“可拖拽”元素。 jqtouch插件支持拖动,但不会丢失。 这里是仅支持iPhone / iPad的拖放。 任何人都可以在拖放插件的方向指向我的android / ios? ...或者可能更新jqtouch插件的droppability,它已经在Andriod和IOS上运行。 谢谢! 您可以使用Jquery用户界面进行拖放操作,并附带一个将鼠标事件转换为触摸的库,这是您需要

How to make a server?

I'm trying to learn how to use socket.io with phonegap/cordova. The tutorials teach how to use node.js on cmd, but nothing for how to initiate this on my website server. var http = require('http'); var server = http.createServer(function(request, response){ console.log('Connection'); response.writeHead(200, {'Content-Type': 'text/html'}); response.write('hello world');

如何制作服务器?

我正在尝试学习如何使用phonegap / cordova使用socket.io。 这些教程教导如何在cmd上使用node.js,但没有说明如何在我的网站服务器上启动它。 var http = require('http'); var server = http.createServer(function(request, response){ console.log('Connection'); response.writeHead(200, {'Content-Type': 'text/html'}); response.write('hello world'); response.end(); }); server.listen(8001

What role does Socket.IO have with Node.js

I'm fairly new to the world of JS and its abundance of libraries. I'm looking to get into a project that involves network communication (sockets) between clients and a server. In a world with tons of libraries, I cannot make a decision as to which to use. I'm looking for something that will bring efficiency and stability. I've been told that Node.js is like the middleman betw

Socket.IO对Node.js有什么作用

我对JS的世界和丰富的图书馆相当陌生。 我正在寻找一个涉及客户端和服务器之间的网络通信(套接字)的项目。 在拥有大量图书馆的世界里,我无法决定使用哪个图书馆。 我正在寻找能带来效率和稳定性的东西。 我被告知Node.js就像开发人员和Socket.IO之间的中间人。 我被告知这是一个巨大的框架,至少有一半可能不会使用。 我被告知要最大限度地提高效率,最好使用Socket.IO来创建自己的功能。 我自己做了一些研究,发现So