Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - ASP Cookie delete
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASP Cookie delete

 Post Reply Post Reply
Author
aspco View Drop Down
Newbie
Newbie


Joined: 05 April 2016
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote aspco Quote  Post ReplyReply Direct Link To This Post Topic: ASP Cookie delete
    Posted: 05 April 2016 at 5:21pm

Receive data:
gelenveri=request.form("veriA")
Response.Cookies("demo")(gelenveri)=gelenveri

List data:
ForEach yaziver in Request.Cookies("demo")
Response.write yaziver
Next

Output:
Cigaret
L
ighter
Servitude

Delete item:
Gelenveri=request.form("veriA")
Response.Cookies("demo")(gelenveri)=""

I want to delete lighter but deletion does not occur!
How to do?
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: 9791
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 06 April 2016 at 1:27pm
You are probably better deleting the cookie and recreating rather than  trying to modify it.

Why are you storing data in a cookie?

This is a bad way to store data and should be avoided if you can as cookie carry allot of overhead as they need to be set back and forth between the server and the web browser for each connection to the website. So if a page has 30 images the cookie would be sent to the server 30 times for each connection.

In addition the data can be read and modified by the visitor on their computer so is not secure or reliable.

As long as the data does not need to be persistent and stored on the visitors computer for multiple visits to the website I would say you would be better off storing the data in a session variable.
Back to Top
aspco View Drop Down
Newbie
Newbie


Joined: 05 April 2016
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote aspco Quote  Post ReplyReply Direct Link To This Post Posted: 06 April 2016 at 7:08pm
Thank you, my friend.
I'll try a different method...

Stay with love.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.07
Copyright ©2001-2024 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 Policy

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 unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

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