Client side forced disk writes

Discussion in 'Javascript' started by Csaba Gabor, Feb 15, 2011.

  1. Csaba  Gabor

    Csaba Gabor Guest

    I'd like to be able to force a local disk write with javascript (so
    that another instance of the browser detects it).

    I'm in an linux environment with a common file system and about 50
    workstations. Latest and greatest of many browsers (eg. Chromium, FF,
    Opera). I'd like to be able to log into two workstations under the
    same id, run the same (or even different) browsers on the same .htm
    file I'd be writing such that when one of the browser instances writes
    some data (to the disk) the other one is able to pick it up.

    Near as I can tell, most of the browsers I've tested with have a lock
    file so that I can't actually execute two instances from distinct
    workstations at the same time. But even if that were not the case,
    the obvious candidate, cookies, are cached in the browser and not
    written to disk till browser exit. The other obvious candidate,
    localStorage, seems to behave similarly, though I've not tested it so
    extensively.

    Does anyone see a way to accomplish this? There is no server involved
    at this point (I know how to do this given a server), the .htm files
    are local on the desktop. Also, is there a way to avoid the lock
    restriction the browsers complain of under my scenario?

    Thanks,
    Csaba Gabor from Vienna
     
    Csaba Gabor, Feb 15, 2011
    #1
    1. Advertising

  2. On 15/02/11 12:17, Csaba Gabor wrote:

    > I'd like to be able to force a local disk write with javascript (so
    > that another instance of the browser detects it).


    Does javascript allow for local (client side) storage? I know you can
    implement it eg using ms activex in ie, but as I understand it, such
    inter-process communication breaks the javascript security model, so it
    shouldn't be possible (microsoft breaking it aside).

    Rgds

    Denis McMahon
     
    Denis McMahon, Feb 15, 2011
    #2
    1. Advertising

  3. On Feb 15, 6:17 am, Csaba Gabor <> wrote:
    > I'd like to be able to force a local disk write with javascript (so
    > that another instance of the browser detects it).
    >
    > I'm in an linux environment with a common file system and about 50
    > workstations.  Latest and greatest of many browsers (eg. Chromium, FF,
    > Opera).  I'd like to be able to log into two workstations under the
    > same id, run the same (or even different) browsers on the same .htm
    > file I'd be writing such that when one of the browser instances writes
    > some data (to the disk) the other one is able to pick it up.
    >
    > Near as I can tell, most of the browsers I've tested with have a lock
    > file so that I can't actually execute two instances from distinct
    > workstations at the same time.  But even if that were not the case,
    > the obvious candidate, cookies, are cached in the browser and not
    > written to disk till browser exit.  The other obvious candidate,
    > localStorage, seems to behave similarly, though I've not tested it so
    > extensively.
    >
    > Does anyone see a way to accomplish this?  There is no server involved
    > at this point (I know how to do this given a server), the .htm files
    > are local on the desktop.  Also, is there a way to avoid the lock
    > restriction the browsers complain of under my scenario?
    >
    > Thanks,
    > Csaba Gabor from Vienna


    Outside of LocalStorage and the like, I believe you'd have to use
    something like XULRunner or Adobe Air as they are the only other html
    runtimes that have access to the disk on a Linux machine.
     
    Michael Haufe (\TNO\), Feb 15, 2011
    #3
  4. Michael Haufe (TNO) wrote:

    > Csaba  Gabor wrote:
    >
    >> I'd like to be able to force a local disk write with javascript (so
    >> that another instance of the browser detects it).
    >> I'm in an linux environment with a common file system and about 50
    >> workstations.  Latest and greatest of many browsers (eg. Chromium, FF,
    >> Opera).  I'd like to be able to log into two workstations under the
    >> same id, run the same (or even different) browsers on the same .htm
    >> file I'd be writing such that when one of the browser instances writes
    >> some data (to the disk) the other one is able to pick it up.

    >
    > Outside of LocalStorage and the like, I believe you'd have to use
    > something like XULRunner or Adobe Air as they are the only other html
    > runtimes that have access to the disk on a Linux machine.


    In Flash you have the FileReference API; I'm not sure if it would
    qualify.

    IMHO the only robust solution is to use Apache on the Linux box so you
    have your default CGI/PHP environment. Or why not SSI:

    set: <!--#exec cmd="echo 'mydata' > file.txt" -->
    get: <!--#include file="file.txt" -->

    --
    Bart
     
    Bart Van der Donck, Feb 17, 2011
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jas Shultz
    Replies:
    0
    Views:
    951
    Jas Shultz
    Dec 3, 2003
  2. A. Ashby via DotNetMonster.com

    Old Proxy IP Used By .NET Client Unless Forced by Machine.config

    A. Ashby via DotNetMonster.com, Apr 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    801
    Scott Allen
    Apr 9, 2005
  3. RZavulunov
    Replies:
    2
    Views:
    459
    Danny Tuppeny
    Jan 6, 2006
  4. Boss302
    Replies:
    0
    Views:
    1,056
    Boss302
    Nov 21, 2006
  5. Replies:
    12
    Views:
    523
    santosh
    Nov 15, 2006
Loading...

Share This Page