View Full Version : Questions about cookies
choward93
Dec 7th 2007, 12:05 am
I have been doing some homework on cookie, how they work, etc. I was wondering, can you make a cookie that uses JS that can alter the appearence of a website? Can a cookie alone, once installed on the browser, do this or does there need to be more code to make it work? I found this script which sounds a little like what im talking about:
http://javascript.internet.com/cookies/remove-ads.html
hrcerqueira
Dec 7th 2007, 4:14 am
The cookie itself is just a small piece of information, it can't do nothing alone. What you need is to read it's value either on the server side, or on the client side using javascript, and make the necessary changes accordingly.
ven123
Dec 8th 2007, 5:00 am
cookie is just a file in which you can store information about the session or the user etc. You can do a lot of stuff with this information.
temp2
Dec 8th 2007, 8:35 am
The property is read/write. The property has no default value
A cookie is a small piece of information stored by the browser. Each cookie is stored in a name=value; pair called a crumb—that is, if the cookie name is "id" and you want to save the id's value as "this", the cookie would be saved as id=this. You can store up to 20 name=value pairs in a cookie, and the cookie is always returned as a string of all the cookies that apply to the page. This means that you must parse the string returned to find the values of individual cookies.
Cookies accumulate each time the property is set. If you try to set more than one cookie with a single call to the property, only the first cookie in the list will be retained.
choward93
Dec 9th 2007, 11:38 am
Cool, thats what i wanted to know.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.