Solved

difference between cookies & URL rewriting?

Posted on 2004-08-05
2
4,124 Views
Last Modified: 2013-12-10
difference between cookies & URL rewriting?
0
Comment
Question by:she1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Expert Comment

by:Zyloch
ID: 11731658
Hi

Cookies are stored on the user's local computer. That means the user can modify them if they know how. It also means that users can delete them. Finally, most browsers can be configured not to support cookies for security reasons. However, cookies can be a great asset. You store information on the user's computer, so when you go from page to page on the web, you can always use that information without passing any information between the pages.

URL rewriting, I'm guessing, is to pass all the information you need through the URL. This has the advantage in that if users don't support cookies, it'll work fine. The downside, however, is that to pass information through the URL has limits to how long it can be and it can get messy and complicated.

Regards,
Zyloch
0
 
LVL 7

Accepted Solution

by:
damonf earned 50 total points
ID: 11734661
cookies and URL rewriting are two different ways of tracking sessions.  Cookies is the most commonly used method because it is completely transparent and has the lowest overhead.  Basically a cookie is created on the user's pc with an id number for the session.  Anytime the user comes back, the server can read the cookie, lookup the user's session by the id, and see if he is still active (or new).

URL rewriting accomplishes the task differently.  It is not transparent.  You actually have to encode the session ID into the pages of the application and pass it along every time a URL is submitted (e.g. in a hidden field or as part of a URL ... hence the name).  Most application servers do support URL rewriting, which means you don't actually have to handle the session stuff yourself ... once you take care of the URL part and make sure every page tracks the session Id, you write your application normally.  You just have to set your server to use URL rewriting as the session tracking mechanism.

The main advantage of URL rewriting is that is works even if cookies are turned off.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question