SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Save pages of your interest

    I saw some pages where you can save particular links from the page.

    So when you finish searching the whole site you can click on this saved links and for instance choose and review the best offer of this 10 offers for example that you have saved and that you are interested in.

    Even if you come tomorrow, the saved links are still there.

    How can I accomplish this? Shell I put all saved links in a cookie? Is there any other way?

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could store the urls in a cookie. But, there's limits to how much data can fit in a cookie, and in general, it's good to minimize the amount of data you put in a cookie.

    An alternative would be to generate a unique id, and store this in a cookie. This id would be used to lookup the urls stored in a database which correspond to that specific id.

    Both of these still have a limitation in that if the user clears/loses the cookie, thier list is essentially lost. If your users login with a username, then that would be a better way to maintain the association. It would also allow them to access the list from a different computer or browser, whereas the cookie solution would not.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by crmalibu View Post
    You could store the urls in a cookie. But, there's limits to how much data can fit in a cookie, and in general, it's good to minimize the amount of data you put in a cookie.

    An alternative would be to generate a unique id, and store this in a cookie. This id would be used to lookup the urls stored in a database which correspond to that specific id.

    Both of these still have a limitation in that if the user clears/loses the cookie, thier list is essentially lost. If your users login with a username, then that would be a better way to maintain the association. It would also allow them to access the list from a different computer or browser, whereas the cookie solution would not.
    Thank you very much.

    I saw a site where they use some cookies and I've taken look in the cookie but you can not read links in the cookie so they probably store all variables in database and just store your ID in cookie and in the database to identify you.

    Thanks for letting me know of cookie limit. I just checked and we can fit 120 entries provided that each does average for not more than thirty bytes (ie. 10 characters if anything is allowed or 30 characters if entry is limited to alphanumeric).

    Once again, thanks. Very kind of you.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •