|
From: <ma...@us...> - 2011-08-09 19:26:12
|
Revision: 398
http://openautomation.svn.sourceforge.net/openautomation/?rev=398&view=rev
Author: makki1
Date: 2011-08-09 19:07:58 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
Quirk to workaround a cache-issue with some Android/Webkit and make relative path to cgi-bin - be reverse-proxy friendlier
Modified Paths:
--------------
CometVisu/trunk/visu/lib/cometvisu-client.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/lib/cometvisu-client.js
===================================================================
--- CometVisu/trunk/visu/lib/cometvisu-client.js 2011-08-09 17:59:51 UTC (rev 397)
+++ CometVisu/trunk/visu/lib/cometvisu-client.js 2011-08-09 19:07:58 UTC (rev 398)
@@ -151,7 +151,12 @@
*/
this.write = function( address, value )
{
- var request = 'a=' + address + '&v=' + value;
+ /**
+ * ts is a quirk to fix wrong caching on some Android-tablets/Webkit;
+ * could maybe selective based on UserAgent but isn't that costly on writes
+ */
+ var ts = new Date().getTime();
+ var request = 'a=' + address + '&v=' + value + '&ts=' + ts;
$.ajax( {url:this.urlPrefix + 'w',dataType: 'json',context:this,data:request} );
}
@@ -185,3 +190,4 @@
};
CometVisu.prototype.update = function( json ) {}
+
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2011-08-09 17:59:51 UTC (rev 397)
+++ CometVisu/trunk/visu/lib/templateengine.js 2011-08-09 19:07:58 UTC (rev 398)
@@ -25,7 +25,7 @@
var main_scroll;
var old_scroll = '';
-visu = new CometVisu('/cgi-bin/');//{};
+visu = new CometVisu('../cgi-bin/');//{};
visu.update = function( json ) // overload the handler
{
for( key in json )
@@ -382,4 +382,4 @@
if( src.indexOf('?') < 0 ) src += '?';
$(this).data('interval', setInterval( function(){refreshAction(target, src);}, refresh ) );
}
-}
\ No newline at end of file
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|