Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Store data on client?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Store data on client?

 Post Reply Post Reply Page  12>
Author
Dan H View Drop Down
Newbie
Newbie


Joined: 17 September 2006
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan H Quote  Post ReplyReply Direct Link To This Post Topic: Store data on client?
    Posted: 09 August 2008 at 5:31pm
I want my asp page to accept & process user inputs, then store that data on the client machine (in txt, or xml). Can this be done under asp - sort of like dropping a cookie - rather than expecting the user to download the file?
I'd want to check for the file when the page is opened, load it if it exists and create new or update on page closing.
Thoughts?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2008 at 5:54pm
Not possible if you could just drop files onto a users PC then this would open up a massive security hole that hackers, viruses, etc. would exploit. 
Back to Top
Dan H View Drop Down
Newbie
Newbie


Joined: 17 September 2006
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan H Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2008 at 6:37pm
Figures- have to lock everything up, 'cuz of the clowns and crooks.
Is there a way to get permission and a spot to store file without a lot of client complication?
Back to Top
Dan H View Drop Down
Newbie
Newbie


Joined: 17 September 2006
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan H Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2008 at 6:56pm
A cookie may just be the way to go- ie5 has no max size; Netscape has a 4k limit; not sure about Firefox (check me on these). I can stuff the 1k I need into a csv string and persist it as long as I like. This gives me behind-the-scenes operation, no login to forget, db to protect, etc, etc.
Ok- poke my bubble; why is this a bad idea?
Back to Top
Jono View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 18 September 2006
Location: United Kingdom
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jono Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2008 at 8:36am
Can't see anything wrong with the idea. Of course, not everyone has cookies enabled. If it's just for the user session, you could use an ASP session variable.
There are also other formats that you could use (JSON, XML, etc) if that's more appropriate than CSV. I've started using the prototype framework within the client side code (http://www.prototypejs.org). It's good as it helps remove the cross browser code issues.
 
Hope this helps,
 
Jono
Back to Top
Dan H View Drop Down
Newbie
Newbie


Joined: 17 September 2006
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan H Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2008 at 3:44pm
Thanks for the reply.
That Prototypejs looks interesting! Of course, I'd already promised myself I'd look at Google Android...
There's so much stuff- and so little time!
Back to Top
Jono View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 18 September 2006
Location: United Kingdom
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jono Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2008 at 4:00pm
Yeah - there are *LOTS* of frameworks out there - i went for the simplest, as i'd already written 50% of the application and just wanted the AJAX features to replace my existing library. I then looked at the other features and "enhanced" (i.e. deleted half) my code. It's rare I go "wow", but I did with prototype.
 
I've not looked at Andriod, but other frameworks give you almost complete applications (and even desktops!)
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 11 August 2008 at 7:45am
One thing to note is that cookies do a round robin trip to the persons computer and back for every HTTP connection on your website, this includes every web page and every image within a web page.

For this reason I would avoid storing larger amounts of data in a cookie as it would slow down your site and increase the amount of bandwidth you use.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.