Print Page | Close Window

Store data on client?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=26086
Printed Date: 29 March 2026 at 4:41am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Store data on client?
Posted By: Dan H
Subject: Store data on client?
Date 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?



Replies:
Posted By: WebWiz-Bruce
Date 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. 

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Dan H
Date 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?


Posted By: Dan H
Date 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?


Posted By: Jono
Date 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 - http://www.prototypejs.org ). It's good as it helps remove the cross browser code issues.
 
Hope this helps,
 
Jono


Posted By: Dan H
Date 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!


Posted By: Jono
Date 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!)


Posted By: WebWiz-Bruce
Date 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.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: palme
Date Posted: 29 August 2008 at 2:56am
Hi
in javascript is a command , Document.execCommand, this may be help your question
for copy , open, save, saveas  file in client's pc, but i have not try it without agreement of user to save a file.
not sure!. but i hope this help you


-------------
thanks
http://www.e-pizza.dk - http://www.e-pizza.dk http://www.franskhotdog.dk - Fransk Hotdog http://www.qmars.dk/D - qmars


Posted By: Dan H
Date Posted: 29 August 2008 at 6:38am
Interesting- I'll have to read up on Javascript!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net