Welcome to WebmasterWorld Guest from 54.196.244.186

Forum Moderators: open

Message Too Old, No Replies

javascript in a cookie?

bandwidth-saving

     
10:50 pm on May 19, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 5, 2006
posts:69
votes: 0


Is it possible to put variables containing javascript into a cookie? I'm considering different bandwidth-saving methods.
6:07 pm on May 20, 2007 (gmt 0)

Full Member

5+ Year Member

joined:Feb 12, 2006
posts:224
votes: 0


yes it is possible. you just need to store the javascript in a cookie then eval() it at the other end. however i think caching javascript would probilby work better
2:00 pm on May 21, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 17, 2005
posts:4965
votes: 10


Since cookies are passed with each request/response, you will be using MORE bandwidth if you try to do this.
6:30 pm on May 21, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 5, 2006
posts:69
votes: 0


Ah, I see. Thank you.