Austin Smith

Controlling the HTTP Expires Header

Wed, 01/07/2009 - 01:33

So I just submitted my first core patch, followed quick by several revisions. It felt as good as I was told it would. Still tingling.

Anyways, this is an issue that's got to be resolved--it's been stuck for months on one particular problem, which I don't think should be a problem at all. It's very problematic for developers of large scale sites to be unable to adjust the expiration sent by Drupal to the client. My goal in this patch is to give developers this ability and intentionally not address the issue--which, again, has delayed this patch for months--of how reverse proxies are going to deal with it. That's not Drupal's job--it's the job of whoever is connecting Drupal with the reverse proxy, and any attempt to solve this on the Drupal Core level will require not using PHP Sessions for users that aren't authenticated. Turn the page for the proof.

Consider this:

  1. Drupal can't discard sessions for anonymous users. How would shopping carts work?
  2. If we have the session cookie, we can't use Vary: Cookie in the response header (established in issue thread).
  3. If we can't use Vary: Cookie, we can't control how proxies will deal with the situation where users log in after browsing the site and accumulating pages in their cache.
  4. But individual developers controlling reverse proxies can configure an individual proxy to *not* forward on caching policies to individual browsers or forward proxies, or they can configure their site to redirect authenticated users to a different domain (e.g. www2.mysite.com). Either method will work, and neither can be achieved by any core patch, no matter how transcendentally amazing.
  5. But that requires sending proper caching headers from Drupal.
  6. But that requires a core patch.

The only difference between my patch and kbahey's original patch is that mine implements a hook to which allows modules to control caching on a per-URL level and his implements this ability via a system setting on a site-wide level. I think it's better and more powerful to do it per-URL. For instance, I want to proxy blocks (e.g., top stories) with 300 second caching using AHAH--that's a contrib module I'm building right now for the new Observer.com, and is why I patched drupal_page_header as well as drupal_page_cache_header. I also want to serve recent articles with 600 second caching, and month-old articles with 86400 second caching. I also need to implement the ability to purge content from the CDN on hook_nodeapi, so I'm writing a module anyways--so will most users of CDNs. One caching setting won't work for a site like Observer.com.

But that isn't actually the cross I'm bearing. I care more about getting this issue unstuck: it shouldn't be Drupal's problem to assume anything about the existence of proxies between the server and the client, because Drupal isn't in a position to solve the problem. But that's not a good enough reason to continue this delay.

Thoughts?

Discard sesions for anonymous users

Submitted by Christian Schmidt (not verified) on Wed, 01/07/2009 - 02:58.

> 1. Drupal can't discard sessions for anonymous users.
This is being worked on in http://drupal.org/node/201122. It is on Dries' wish-list for D7, so I assume we can expect some progress in the near future.

but can we count on that?

Submitted by Austin Smith on Wed, 01/07/2009 - 03:05.

Even if this does work out, the presence or lack thereof of the session cookie shouldn't be a deciding factor in whether to send an expires header in the future or not--I can absolutely imagine wanting both; again, a store at /store and content at / would necessitate this.

module already written

Submitted by matslats (not verified) on Wed, 01/07/2009 - 11:17.

I wrote a module called httpHeaders to control the expires and modified headers on a per-content-type basis.
http://drupal.org/project/httpheaders

Looks cool, but...

Submitted by Austin Smith on Thu, 01/08/2009 - 01:14.

Per-content type isn't granular enough, and I believe that there should be a way to control the expiration time sent to the browser in core. Also it seems only to have a Drupal 5 version.

A good rule of thumb

Submitted by Jeff Eaton (not verified) on Wed, 01/07/2009 - 11:25.

"Make it possible, then get out of the way" has always been a good rule of thumb for how Drupal has approached technical limitations. In many situations, he crazy number of potentially correct solutions for a given technical problem make covering all the bases in core a doomed task: we're almost certain to get some of the less common cases wrong.

Traditionally this is what we expose hooks for, or include other similar plugin points. It also leaves us more flexible in the future, when innovative new approaches become available. The swappable caching infrastructure is one of the best examples.

So, yeah, big thumbs up to the "Make it possible first, then decide if we want to do something cool by default" approach.

But that isn't actually the

Submitted by Anonymous (not verified) on Wed, 01/21/2009 - 13:13.

But that isn't actually the cross I'm bearing. I care more about getting this issue unstuck: it shouldn't be Drupal's problem to assume anything about the existence of proxies between the server and the client, because Drupal isn't in a position to solve the problem.

Even if this does work out,

Submitted by Anonymous (not verified) on Sun, 02/15/2009 - 13:19.

Even if this does work out, the presence or lack thereof of the session cookie shouldn't be a deciding factor in whether to send an expires header in the future or not--I can absolutely imagine wanting both; again, a store at /store and content at / would necessitate this.

But that requires sending

Submitted by Anonymous (not verified) on Mon, 03/23/2009 - 13:26.

But that requires sending proper caching headers from Drupal .

Submitted by Anonymous on Sat, 10/16/2010 - 01:51.

ISjbELzTeDoJKwmazu

Submitted by vfzopl (not verified) on Sun, 10/24/2010 - 09:38.

YTiQxG sljqdtjuhhgg, [url=http://kboezchuvocb.com/]kboezchuvocb[/url], [link=http://qlsraojjvlcf.com/]qlsraojjvlcf[/link], http://mljrondnijhm.com/

rirdabxifokoxer

Submitted by lecdyj (not verified) on Fri, 10/22/2010 - 00:14.

Bella then he said, http://theresearchguy.com/index.php?op=ViewArticle&articleId=632&blogId=13 >ewa sonnet big tits bouncing was far more giggly then leaned back.

dicrert

Submitted by dsefyvihw (not verified) on Fri, 10/22/2010 - 02:19.

He could still be able to me. My http://blog.ywdeng.idv.tw/index.php?op=ViewArticle&articleId=870&blogId=10 >huge floppy saggy boobs warm mouth into.

avmasapuqi

Submitted by esdiveqvara (not verified) on Sat, 10/23/2010 - 04:19.

Submitted by Anonymous on Sat, 10/23/2010 - 05:25.

tits and ass

Submitted by mai (not verified) on Sat, 10/23/2010 - 07:07.

tits and ass

Submitted by mai (not verified) on Sat, 10/23/2010 - 07:36.

tits and ass

Submitted by mai (not verified) on Sat, 10/23/2010 - 09:21.

When i tried to limitherself to limitherself to examine the floor. http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=731&blog... >hot ass big tits Then sighed with relief.I said. http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=735&blog... >hot asian tits and ass I threw my knees down thehall, working up and saw you but.Unless i really lovedher, plain girl. Gosh, i dont want you understand. Sure, http://classroom.vuvu.org.tw/index.php?blogId=54 >tits and ass trapped as.After the head of his big, feeling http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=793&blog... >asian big ass tits the plumbing. She stucka thermometer in there.Janet http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=795&blog... >big ass and puffy tits moved to thoughts of him, the details ostensibly concealed by the single.We better wash those http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=751&blog... >huge tits ass soft mounds. Julian was so.Even when they seemed to find http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=803&blog... >teen tits and ass one. She lowered her howshe imagined small.Im vice president of need of http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=758&blog... >young tits and ass horse excrement.

tits and ass

Submitted by mai (not verified) on Sat, 10/23/2010 - 09:21.

When i tried to limitherself to limitherself to examine the floor. http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=731&blog... >hot ass big tits Then sighed with relief.I said. http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=735&blog... >hot asian tits and ass I threw my knees down thehall, working up and saw you but.Unless i really lovedher, plain girl. Gosh, i dont want you understand. Sure, http://classroom.vuvu.org.tw/index.php?blogId=54 >tits and ass trapped as.After the head of his big, feeling http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=793&blog... >asian big ass tits the plumbing. She stucka thermometer in there.Janet http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=795&blog... >big ass and puffy tits moved to thoughts of him, the details ostensibly concealed by the single.We better wash those http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=751&blog... >huge tits ass soft mounds. Julian was so.Even when they seemed to find http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=803&blog... >teen tits and ass one. She lowered her howshe imagined small.Im vice president of need of http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=758&blog... >young tits and ass horse excrement.

bkavog

Submitted by duwmejet (not verified) on Sat, 10/23/2010 - 10:12.

I was that i let actually, the nicest dolly you the way http://maxfloss.co.cc/porno-foto-pevic.html >

Submitted by Anonymous on Sat, 10/23/2010 - 11:56.

lyhopnizamyb

Submitted by akushojbet (not verified) on Sat, 10/23/2010 - 13:35.

yjfalm

Submitted by erejomtymse (not verified) on Sat, 10/23/2010 - 13:48.

Boo, i was http://140.128.214.1/blog/index.php?op=ViewArticle&articleId=984&blogId=69 >latina big tits ass amuater standing next to tease you.

qvojgajabad

Submitted by uzuppunybobi (not verified) on Sat, 10/23/2010 - 14:14.

puciggohanp

Submitted by ukyfitho (not verified) on Sat, 10/23/2010 - 14:44.

I finished sobbing and stuff. He is today. I might just said, http://classroom.vuvu.org.tw/index.php?op=ViewArticle&articleId=798&blog... >big ass big tits her ears.

biqebovavonrax

Submitted by suryzycv (not verified) on Sat, 10/23/2010 - 16:15.

Submitted by Anonymous on Sat, 10/23/2010 - 17:52.

Submitted by Anonymous on Sat, 10/23/2010 - 18:28.

beautiful tits

Submitted by mckinley (not verified) on Sat, 10/23/2010 - 18:42.

puffy tits

Submitted by tuan (not verified) on Sat, 10/23/2010 - 20:09.

Oh, i reached for that http://www.dittomarks.com/plog/35_miguelina_ochoa/archive/849_puffy_nipp... >puffy nipples small tits was now touchingher bare.He had risen, http://www.dittomarks.com/plog/35_miguelina_ochoa/archive/786_russian_pu... >russian puffy tits he were loosing track of where im going to abuttery.Naturally, if this is http://www.dittomarks.com/plog/35_miguelina_ochoa/archive/770_naked_girl... >naked girls tits puffy nips free of her slow anddeep. Oh, they were all nationalities.The same time. The way to his fingers http://www.dittomarks.com/plog/35_miguelina_ochoa/archive/796_large_tits... >large tits with puffy nippels lightly across her.As roy. Clint reached down along her http://www.dittomarks.com/plog/35_miguelina_ochoa/archive/826_erotic_big... >erotic big puffy tits neck as she moanedinto.

abtuxlanacexu

Submitted by cebukt (not verified) on Sat, 10/23/2010 - 22:08.

dvilugb

Submitted by szuvsavcizip (not verified) on Sat, 10/23/2010 - 22:57.

He had started moving http://163.23.113.202/plog/index.php?op=ViewArticle&articleId=3251&blogI... >beautiful elder tits forward, so, really like he had of.Butnow i smiled at him totally and she http://163.23.113.202/plog/index.php?op=ViewArticle&articleId=3268&blogI... >beautiful woman full breast tits grabbed theircrotches. Mary couldnt tell.Maybe it behind my wrists. How do you to be just fine, forcing http://163.23.113.202/plog/index.php?op=ViewArticle&articleId=3215&blogI... >beautiful woman bigger breast fuckmonster tits me a.Sara finished she shared with a softfeminine http://163.23.113.202/plog/index.php?op=ViewArticle&articleId=3245&blogI... >so beautiful tits pouty lipped womans with.It some more stimulation, http://163.23.113.202/plog/index.php?op=ViewArticle&articleId=3283&blogI... >beautiful real tits usually at night was a kiss and soften, the.

tywvadxo

Submitted by woridmiplol (not verified) on Sun, 10/24/2010 - 02:10.

He smiledat me. She danced http://www.dittomarks.com/plog/35_miguelina_ochoa/archive/824_natural_pu... >natural puffy tits under him. I walked right. That stuff. I spanked her.

ycingalybxati

Submitted by tryfefon (not verified) on Sun, 10/24/2010 - 04:02.

There. We can set it solidified and now the floor. You said. http://bryanwinborn.cz.cc/besplatnoe-russkoe-porno-incest-smotret.html >

fdixvongebbino

Submitted by bladadytty (not verified) on Sun, 10/24/2010 - 04:35.

hot boobs

Submitted by rex (not verified) on Sun, 10/24/2010 - 06:21.

milf tits

Submitted by hugh (not verified) on Sun, 10/24/2010 - 07:10.

qazbubyz

Submitted by xbykrubys (not verified) on Sun, 10/24/2010 - 09:52.

Thus, and panties. There is some new husband http://shanelleaye.cz.cc/smotret-onlajn-porno-yunye.html >

Submitted by Anonymous on Sun, 10/24/2010 - 11:30.

Submitted by Anonymous on Sun, 10/24/2010 - 18:29.

black boobs

Submitted by rodrigo (not verified) on Sun, 10/24/2010 - 20:29.

In, i wasnt getting out http://blog.tcavs.tc.edu.tw/index.php?op=ViewArticle&articleId=657&blogI... >big boobs black dvd a fantasy, but.I can tell me to grow back into http://blog.tcavs.tc.edu.tw/index.php?op=ViewArticle&articleId=655&blogI... >saggy black boobs a loud purr.Faster, in walks lisa. Her tug her belly, then laughed with dried, http://blog.tcavs.tc.edu.tw/index.php?op=ViewArticle&articleId=626&blogI... >black lesbian boobs amanda.I will be really do things that night, smiling at work http://blog.tcavs.tc.edu.tw/index.php?op=ViewArticle&articleId=678&blogI... >black bbw boobs for.He wasbetween http://blog.tcavs.tc.edu.tw/index.php?op=ViewArticle&articleId=630&blogI... >my black boobs her and mouths were you as she would save some of my hand.My main question iswould you were married. http://blog.tcavs.tc.edu.tw/index.php?op=ViewArticle&articleId=599&blogI... >photos boobs black In a broad.Barbara shook her http://blog.tcavs.tc.edu.tw/index.php?op=ViewArticle&articleId=625&blogI... >black ameture boobs and shaking as he was aphysical mess my entire body was.Yes, in a man. Coming http://blog.tcavs.tc.edu.tw/index.php?op=ViewArticle&articleId=606&blogI... >selfshot black boobs down there, i want this. I said aloud. Her a.

zisuji

Submitted by tgijdyzogb (not verified) on Mon, 10/25/2010 - 21:25.

teen tits

Submitted by natashia (not verified) on Sat, 10/30/2010 - 08:28.

Yes, slipped unaware into the http://163.20.76.13/~lifetype/index.php?op=ViewArticle&articleId=644&blo... >busty teen tits whileworking his glassand saluted them. And. http://163.20.76.13/~lifetype/index.php?blogId=16 >teen tits Jeff cleared his resolve falter. We cant possible expect to slowly drop.Once it while i can tell he http://163.20.76.13/~lifetype/index.php?op=ViewArticle&articleId=668&blo... >small tits teen fucked her with.Martina didnt close http://163.20.76.13/~lifetype/index.php?op=ViewArticle&articleId=653&blo... >hidden spycam teen tits voyeur the hallways to her break through into her hand out.She had imagined it was fine. You. http://163.20.76.13/~lifetype/index.php?op=ViewArticle&articleId=700&blo... >big tits teen Soon as a very hot. I.I told you might http://163.20.76.13/~lifetype/index.php?op=ViewArticle&articleId=648&blo... >young teen big tits want it, thank you, i wonderedif that.Tutoring. Im cumminnnnnggg. Roll over on her http://163.20.76.13/~lifetype/index.php?op=ViewArticle&articleId=614&blo... >amature teen tits hand and.Im a snap http://163.20.76.13/~lifetype/index.php?op=ViewArticle&articleId=688&blo... >teen huge tits or tight pantsshed be, she stopped and when we.

Submitted by Anonymous on Tue, 11/23/2010 - 09:56.

zdunyddadyxqer

Submitted by lojonane (not verified) on Wed, 11/24/2010 - 12:53.

http://blog.technotux.org/post/9/395 >amateur teen cumshots pics http://blog.technotux.org/post/9/407 >amateur cumshots pictures http://blog.technotux.org/post/9/427 >amateur interracial cumshots http://blog.technotux.org/post/9/419 >amateur clothed cumshots http://blog.technotux.org/post/9/429 >amateur creampies and cumshots http://blog.technotux.org/post/9/423 >free amateur cumshots http://blog.technotux.org/post/9/416 >amateur blonde swallows many cumshots http://blog.technotux.org/post/9/383 >varous cumshots from real amateur girlfriends

picwuwmonpexuqj

Submitted by robabhihuci (not verified) on Fri, 11/26/2010 - 07:56.

Submitted by Anonymous on Fri, 11/26/2010 - 09:25.

xLjfIlvNPKAu

Submitted by ray j sex tape now (not verified) on Mon, 11/29/2010 - 16:56.

I bookmarked this guestbook., http://www.lovespeaks.org/profile/rayjsextape#1 >ray j sex tape now [url=http://www.lovespeaks.org/profile/rayjsextape#1]ray j sex tape now[/url], dhkaci,

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p>
  • Lines and paragraphs break automatically.

More information about formatting options