sync gateway improvement

30 views
Skip to first unread message

Juan Leyva

unread,
Feb 23, 2011, 12:52:02 PM2/23/11
to MobWrite
Hi Neil,

this is a suggestion to improve the way Mobwrites handles the sync
gateway

If we use an absolute URL as the syncGateway Mobwrite will try to
connect using JSONP to the server.

The problem is that the absolute URL can point to the same server
where the client is running, so I think the best way to handle it is
to detect at the client the URL and set remote to true if is not the
same that the configured in syncGateway. See the code bellow to see
how it works now

var remote = (mobwrite.syncGateway.indexOf('://') != -1);

Regards
Reply all
Reply to author
Forward
0 new messages