Forcing backend http requests to go thru varnish

Payton, Joy J PaytonK at
Wed Nov 13 15:52:29 CET 2013

Solved!  It was an ESO (equipment smarter than operator) error on my part... literally a typo.

Thanks for checking in.


-----Original Message-----
From: Dridi Boukelmoune [mailto:dridi.boukelmoune at] 
Sent: Tuesday, November 12, 2013 1:59 PM
To: Payton, Joy J
Cc: varnish-misc at
Subject: Re: Forcing backend http requests to go thru varnish


I'm slowly catching up on the mailing list, and obviously I'm a bit late. I haven't seen any response, is your problem solved or do you still need help ?


On Tue, Oct 8, 2013 at 7:05 PM, Payton, Karen J <PaytonK at> wrote:
> Hi all,
> I have some js in a site on my backend that does a jQuery get on an 
> ajax page within the same site (so in theory all the work takes place 
> in the same webserver).
> The code looks something like this:
> jQuery.get('/ajax?reqtype=providersearch&location='+mylocation+'&maxdi
> stance='+maxdistance+'&cat=,'+mycat);
> Of course I'd like to repopulate the Varnish cache for a long list of 
> zip codes, so I set up a wget that would hit this ajax page for any 
> number of location variables.
> The only problem is that from within the site, it doesn't know about 
> Varnish and doesn't go thru Varnish as the front end… so my 
> prepopulated cache is worthless when my page hits that same ajax from 
> within a web session.  At least I think that's what's going on.
> I thought that forcing a fully qualified url might cause the 
> jQuery.get to go outside the server and come thru the Varnish front door, so I coded this:
> jQuery.get('http://[]/programs/roadmap/ajax/?req
> type=providersearch&location='+mylocation+'&maxdistance='+maxdistance+
> '&cat=,'+mycat);
> Still no dice.  Anyone have experience getting an ajaxed chunk of data 
> cached effectively using Varnish?
> Thanks for your help, I'm new so if this is obvious please forgive my 
> ignorance!
> Joy Payton
> Web Services
> X 67658
> great service à great discoveries
> Have I provided you with great service that powers your great discoveries?
> Tell me about it.
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at

More information about the varnish-misc mailing list