Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

difference between cookies & URL rewriting?

Posted on 2004-08-05
2
Medium Priority
?
4,416 Views
Last Modified: 2013-12-10
difference between cookies & URL rewriting?
0
Comment
Question by:she1
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 200 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

916 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