-
April 19th, 2011, 03:49 PM
#1
Running StockListDemo_Basic from file://
Hi,
I need to get the following example up and running locally (i.e. from 'file://' rather than 'lightstreamer.com':
http://www.lightstreamer.com/demo/StockListDemo_Basic/
When I set the domain/context to "" or null as was recommended here before, it doesn't work. I'm using Firefox 4, and am just loading the main html page and misc.js file from the local filesystem - everything else is coming across the web.
pushPage.context.setDomain(null);
or
pushPage.context.setDomain("");
What else do I need to change, please? I would rather run this from file:// rather than on a local Apache server.
Thanks.
-
April 20th, 2011, 10:10 AM
#2
hi,
running from file:/// is not possible. Why do you have such requirement?
see also this thread: http://www.lightstreamer.com/vb/showthread.php?t=903
-
April 20th, 2011, 11:26 AM
#3
![Quote](images/styles/AestheticaGreen/misc/quote_icon.png)
Originally Posted by
Mone
Thanks for the reply.
Is this a browser restriction or a Lightstreamer client restriction? In a secure test environment, If I add netscape.security.privilegemanager.enableprivilege calls to methods that are throwing errors, I can run anything from file:///, can't I?
For various reasons, I can't host the StockListDemo_Basic on a local Apache implementation, so want to test the client directly from file:///. What do I need to change in the lscommons.js, lspushpage.js, lsengine.js and lsmisc.js files to make this run?
Regards.
-
April 20th, 2011, 11:48 AM
#4
Hi,
the issue is related to the same origin policy implemented by browsers;
actually we never tried
netscape.security.PrivilegeManager.enablePrivilege ("UniversalBrowserRead") so I'm not sure if that would work; at least out of the box. I may guess that you need that setting on both your html file and our lsengine.html but I didn't try it.
I think that's probably easier and quicker to install a web server and configure the hosts file than try to make that work.
HTH
-
April 20th, 2011, 12:00 PM
#5
-
April 20th, 2011, 12:26 PM
#6
Are all the GETs/PUTs to the
www.lightstreamer.com domain and push.lightstreamer.com domain done from the lsengine.html page?
actually, not.
most requests are made from ajax_frame.html (that comes from the pushserver).
If needed the client falls back using lsform.html . As the environment (ie the app loaded from file:///) is unexpected from our point of view I can't exclude that such fallback may happen in your case.
Alternatively, if I edit the hosts file, should I ONLY add
www.lightstreamer.com and not push.lightstreamer.com so that the assets from the
www.lightstreamer.com domain will be picked up from the www folder, but that requests to push.lightstreamer.com will go out to the remote server?
yes that's correct if you're going to use our online server and your local webserver.
Similar Threads
-
By faa666 in forum General
Replies: 1
Last Post: February 15th, 2012, 09:54 AM
-
By surya in forum Client SDKs
Replies: 6
Last Post: March 3rd, 2011, 04:35 PM
-
By colmfield in forum Client SDKs
Replies: 4
Last Post: September 21st, 2010, 12:11 PM
-
By GoatHunter in forum General
Replies: 2
Last Post: August 25th, 2009, 11:54 AM
-
By janjons in forum General
Replies: 1
Last Post: September 23rd, 2008, 10:50 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 02:20 PM.
Bookmarks