Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Save Local File

by SmokeyB (Scribe)
on Jul 11, 2003 at 18:29 UTC ( [id://273514]=perlquestion: print w/replies, xml ) Need Help??

SmokeyB has asked for the wisdom of the Perl Monks concerning the following question:

I am creating a thin client application that will be accessable on an Intranet. Each user should be able to create personal setttings for themselves and save them. I'm probably crazy for asking, but is there a way to store the config file for each user on their system, without using cookies? I'm just trying to create a persitant environtment without having to save all config files on the web server. Cheers!

Replies are listed 'Best First'.
Re: Save Local File
by freddo411 (Chaplain) on Jul 11, 2003 at 18:51 UTC
    I'm sure you realize that the whole point of a thin client is that, well, the client-side is minimized. Generally, the thin-clieint of choice is a web-browser, which tends to be on almost every desktop machine already.

    If you are using a browser, or its java engine, you don't have permission to write files onto the client computer (excepting cookies). Only active X controls allow you to violate this security provision.

    Why storing config information on the client-side is a "bad thing".

    • The user can't see his|her preferences on another machine (at work, at home, one the road, etc).
    • Client-side info is vunerable to hacking, accidental distruction/reformating, etc.
    • If you try to stuff lots of info into a cookie, you'll soon learn that there are size limits, and you'll discover that cookies get clobbered...
    So even if you could, you shouldn't.

    The most commonly seen architecture in thin-client internet applications is a user login, producing an encrypted identifying token stored in a temporary cookie. If information is not considered sensitive then sometimes a persistant cookie can be used (perlmonks.org for example).

    -------------------------------------
    Nothing is too wonderful to be true
    -- Michael Faraday

      I understand what you are saying. The application itself is going to be used on mobile devices, and in this environment, the chances of clearing out the cookies on a constant basis is very high.

      The information being stored is not for individual user settings, but for specific information about the device being used.

      I currently have it setup to store the needed information on the local webserver, but due to the nature of the app, it would work out better if I can store this information locally.

      I didn't think there was such a way, but I thought it wouldn't hurt to ask!

      Thanks!
        You could store the information on a per device basis on the server, and then have the link on that device include a parameter (or goto a different page for each device) that specifies the current device. Then you could have per device, and per user settings saved on the server. The other option would be to have a dropdown with a list of devices for the user to pick from. Good Luck!
        Eric Hodges
Re: Save Local File
by johndageek (Hermit) on Jul 11, 2003 at 18:46 UTC
    John's 2cents: Intranet implies people may move from workstation to workstation, wouldn't it be preferable to have their setting based upon their login and available whereever they login from? Local storage of settings works well when the odds of a user always using the same workstation is very high. Good Luck! Happy Perling.
Re: Save Local File
by sauoq (Abbot) on Jul 11, 2003 at 18:43 UTC
    I'm probably crazy for asking, but is there a way to store the config file for each user on their system, without using cookies?

    Not if the client is a plain old browser, no.

    -sauoq
    "My two cents aren't worth a dime.";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://273514]
Approved by flounder99
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-03-29 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found