Results 1 to 6 of 6
  1. #1
    tarbhjohnnydick
    Guest

    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.

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    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

  3. #3
    tarbhjohnnydick
    Guest
    Quote Originally Posted by Mone
    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
    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.

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    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

  5. #5
    tarbhjohnnydick
    Guest
    Using netscape.security.privilegemanager.enableprivilege will circumvent the cross-domain policy (NOTE: be aware what this actually opens up!).

    I may guess that you need that setting on both your html file and our lsengine.html but I didn't try it.
    Are all the GETs/PUTs to the www.lightstreamer.com domain and push.lightstreamer.com domain done from the lsengine.html page?

    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?

    Also, is this correct? I run the following assets on Apache:

    http://www.lightstreamer.com/demo/StockListDemo_Basic/
    http://www.lightstreamer.com/demo/St.../css/table.css
    http://www.lightstreamer.com/demo/co...r/lscommons.js
    http://www.lightstreamer.com/demo/co...custom/misc.js
    http://www.lightstreamer.com/demo/co.../lspushpage.js
    http://www.lightstreamer.com/demo/co.../lsengine.html
    http://www.lightstreamer.com/demo/co...r/lscommons.js
    http://www.lightstreamer.com/demo/co...er/lsengine.js
    http://www.lightstreamer.com/demo/co...htstreamer.com
    http://www.lightstreamer.com/demo/co...htstreamer.com
    http://www.lightstreamer.com/demo/co...htstreamer.com
    http://www.lightstreamer.com/demo/co...htstreamer.com
    http://www.lightstreamer.com/demo/co...htstreamer.com
    http://www.lightstreamer.com/demo/co...htstreamer.com

    But let the following requests leave the machine and go to the remote server:

    http://push.lightstreamer.com/lights...tstreamer.com&
    http://push.lightstreamer.com/lights...ate_session.js
    http://push.lightstreamer.com/lights...ind_session.js
    http://push.lightstreamer.com/lights...ate_session.js
    http://push.lightstreamer.com/lights...ind_session.js
    http://push.lightstreamer.com/lightstreamer/control.js
    http://push.lightstreamer.com/lights...ind_session.js

    Am I on the right track?

    Thanks.

  6. #6
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    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

  1. Current delay in log file
    By faa666 in forum General
    Replies: 1
    Last Post: February 15th, 2012, 09:54 AM
  2. Running LS client from file
    By surya in forum Client APIs
    Replies: 6
    Last Post: March 3rd, 2011, 04:35 PM
  3. Log file error
    By colmfield in forum Client APIs
    Replies: 4
    Last Post: September 21st, 2010, 12:11 PM
  4. How can I limit the log file size ?
    By GoatHunter in forum General
    Replies: 2
    Last Post: August 25th, 2009, 11:54 AM
  5. where to put the licence file?
    By janjons in forum General
    Replies: 1
    Last Post: September 23rd, 2008, 10:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 08:22 PM.