Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Feb 2011
    Location
    Chennai
    Posts
    2

    Running LS client from file

    Hi

    Is it possible to run a LS client from file (i.e without hosting it on any web server or lightstream server) ?

    If yes, then what would be the parameters for DomainContext and LSHost ?

    I tried to go around this by modifying the host file in windows, but it doesn't work.

    Any help would be appreciated.

    Thanks.

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Unfortunately there is no such possibility.

    Note that such restriction is enforced by browsers' security constraints.
    You may use any other client API to have a working application without the need to host it on a web server (e.g.: if you are familiar with javascript you may write an AIR application using the Flex client APIs).

    HTH

  3. #3
    Member
    Join Date
    Feb 2011
    Location
    Chennai
    Posts
    2
    Thanks for the reply.

    The point is we are trying to build a mobility app using Manifest(HTML5), to avoid downloading all the files every time. It is proposed to be a hybrid app (using headless browser to load the app from disk, i.e.UI Web View).

    So could you suggest any solution or workaround for such an app to communicate with the lightstreamer server.

    Thanks.

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    sorry, I misunderstood your question;
    I thought you wanted to access an application through file:/// instead of http:// or https://

    If you're using HTML5 Manifest file to cache the application on disk, this should be completely transparent from the point of view of the application and then you should not have any problem using Lightstreamer libraries within it.

  5. #5
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    ok, actually it seems that there is an issue with the libraries
    sorry, I'll let you know as soon as I have any news.

  6. #6
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,
    I confirm that you can use Lightstreamer libraries with HTML5 offline application caching.
    I was able to successfully run an offline application on Firefox 3.6, Chrome, Opera 11 and Safari 5
    I still have not tried mobile browsers (Android Browser, iOs Safari, Opera Mini and Mobile should all support this feature, see http://caniuse.com/#feat=offline-apps ).

    All you have to do to let the application work is specify lightstreamer files in the manifest file like this:

    Code:
    lscommons.js
    lspushpage.js
    lsengine.html?build=XXXX
    lsengine.js?XXXX
    lsblank.html?domain=yourdomain.com
    lsform.html?yourdomain.com
    where yourdomain.com is the actual domain you're using in your setDomain calls and XXXX is the build number of the lightstreamer libraries (you can find it in the library folder inside the build.number file. If you prefer you can also find it as last piece of the Lightstreamer.version property available on the page once the libraries are included)

    Please also note that only Chrome seems to properly support absolute file paths; To let the app work I had to place lightstreamer libraries in a folder that is a son of the folder where the "main" html file is (though I did not try relative "../" paths).

    let me know if you have any issue,
    HTH

  7. #7
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    just a couple of final notes

    1. actually Opera Mini/Mobile does not support offline web apps
    2. iOS and Android browsers work as exepected
    3. in the next version of the libraries to add the build number in the manifest entries of lsengine.html and lsengine.js will not be necessary

 

 

Similar Threads

  1. where to download Java SE Client jar file
    By joshi_s_p in forum Client SDKs
    Replies: 3
    Last Post: January 4th, 2012, 09:30 AM
  2. Running StockListDemo_Basic from file://
    By tarbhjohnnydick in forum Client SDKs
    Replies: 5
    Last Post: April 20th, 2011, 12:26 PM
  3. Log file error
    By colmfield in forum Client SDKs
    Replies: 4
    Last Post: September 21st, 2010, 12:11 PM
  4. Replies: 5
    Last Post: August 20th, 2009, 11:38 AM
  5. Running Lightstreamer Web Client : Permission Denied
    By cbradbury in forum Client SDKs
    Replies: 1
    Last Post: February 5th, 2007, 07:32 PM

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 10:28 PM.