Last questions I have...

20 views
Skip to first unread message

Maria Jabon

unread,
Dec 8, 2008, 6:51:50 PM12/8/08
to CS193H High Performance Web Sites
These were a few more I found challenging..

Why are long expiration dates more problematic for cookies than HTTP
resources?

How does the browser decide which cookies to send? When does it stop
sending a cookie? What's a session-based cookie and how do you create
one?

I think it sends them all, but not sure on the rest.

What are the choices for handling "www"? List the pros and cons, and
recommended solution.
Redirect or cookies. Pro of cookies – no duplicate downloading of
sources

Vibhor Nanavati

unread,
Dec 9, 2008, 1:45:12 AM12/9/08
to cs193...@googlegroups.com
On Mon, Dec 8, 2008 at 3:51 PM, Maria Jabon <mja...@stanford.edu> wrote:

These were a few more I found challenging..

Why are long expiration dates more problematic for cookies than HTTP
resources?
because cached http resources can be avoided by revving or removing the reference. in case of cookies, browser only sends back cookie. server doesn't see domain, path or expiration so avoiding cookies with long expiration is non-trivial (need technique such as periodic purging).


How does the browser decide which cookies to send? When does it stop
sending a cookie? What's a session-based cookie and how do you create
one?

browser matches the domain and path of the request with that of cookie(s). It stops sending a cookie after expiration data. You can create a session-based cookie in php using session_set_cookie_params



I think it sends them all, but not sure on the rest.

What are the choices for handling "www"? List the pros and cons, and
recommended solution.
Redirect or cookies.  Pro of cookies – no duplicate downloading of
sources





--
VIBHOR NANAVATI <vib...@stanford.edu>

Reply all
Reply to author
Forward
0 new messages