Monthly Archives: آبان 1392
Leave a reply
Comment by Nasser Torabzade on Proper settings for socket.io flash (and other) fallbacks for clients using a proxy
but I've done that! as you can see in my question, the last field of
transport
array is flashsocket
. any other suggestion? nasser-torabzade opened issue LearnBoost/socket.io#1348
Proper settings for socket.io flash (and other) fallbacks for clients using a proxy
Salam (means hello) :)
I have the following basic settings in my node.js application. But it doesn't work for clients who are connected using a proxy or are behind a firewall. I want to know what should I add to get socket.io fallback to work as expected:
Server side:
var io = require('socket.io').listen(3000, {
log: 3,
flashPolicyServer: true,
transports: ['htmlfile', 'xhr-polling', 'jsonp-polling', 'flashsocket']
});
io.sockets.on('connection', function(){
// my event handlers
});
Client side:
WEB_SOCKET_SWF_LOCATION = "oath/to/my/copy/of/WebSocketMain.swf";
var socket = io.connect('http://localhost:3000');
// my event handlers
Proper settings for socket.io flash (and other) fallbacks for clients using a proxy
Salam (means hello) :)
I have the following basic settings in my node.js application. But it doesn't work for clients who are connected using a proxy or are behind a firewall. I want to know what should I add to get socket.io fallback to work as expected:
Server side:
var io = require('socket.io').listen(3000, {
log: 3,
flashPolicyServer: true,
transports: ['htmlfile', 'xhr-polling', 'jsonp-polling', 'flashsocket']
});
io.sockets.on('connection', function(){
// my event handlers
});
Client side:
WEB_SOCKET_SWF_LOCATION = "oath/to/my/copy/of/WebSocketMain.swf";
var socket = io.connect('http://localhost:3000');
// my event handlers
Answer by Nasser Torabzade for Ajax with deeplink
nasser-torabzade starred sockjs/sockjs-client
nasser-torabzade starred jrburke/requirejs
nasser-torabzade starred substack/dnode
The Conjuring (2013)
Answer by Nasser Torabzade for Centering an image larger than browser window, which can then be used as a rollover image
You can set your image as a centered background of a div:
<!DOCTYPE html>
<head>
<style>
body{
overflow-x: hidden;
}
#bigImage{
background:url('sitewide.png') no-repeat top center;
width: 2880px;
height: 540px;
}
</style>
</head>
<body>
<div id="bigImage"></div>
</body>
</html>
Answer by Nasser Torabzade for Centering an image larger than browser window, which can then be used as a rollover image
You can set your image as a centered background of a div:
<!DOCTYPE html>
<head>
<style>
body{
overflow-x: hidden;
}
#bigImage{
background:url('sitewide.png') no-repeat top center;
width: 2880px;
height: 540px;
}
</style>
</head>
<body>
<div id="bigImage"></div>
</body>
</html>
nasser-torabzade starred cesarhdz/Clean-TimThumb
Comment by Nasser Torabzade on Centering an image larger than browser window, which can then be used as a rollover image
@ZacharyShampine so the only thing I can think of is to set your image as background of a div, I updated my answer.
Comment by Nasser Torabzade on Centering an image larger than browser window, which can then be used as a rollover image
@ZacharyShampine you're welcome. just add a
text-align:center;
to your css, it should work. I updated my answer.