Forum Discussion

dragonflymr's avatar
dragonflymr
Icon for Cirrostratus rankCirrostratus
May 08, 2015

AAM IBR and browser conditional GET - expert advice needed

Hi,

I am trying to figure out why browser is performing conditional GET instead of imediatelly retrieve object from local cache. Browser is connecting to VS with Web Acceleration AAM enabled profile assigned. IBR is working as I can see hash added to objects, Cache-Control headers are present.

Still each time page is reloaded for all objects conditional GET is issued. That makes IBR less than optimal as there is no saving on RTT for conditional GETs.

Below transactions for one object

First page load, clean cache

GET /Portals/0/portal.css;wa42c972a572376dab?cdv=545 HTTP/1.1
Host: www.host.com
Accept: text/css,*/*;q=0.1
Accept-Encoding: gzip, deflate, sdch
Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4
Cookie: .ASPXANONYMOUS=ksN9_Z2-0AEkAAAAMWU0NGU1M2QtZWYxNy00ZjYzLTllM2UtODBiZTM1ZGRiNWQ40; ASP.NET_SessionId=0qsuljchcmws3rnxe5u1mrh4; _gat=1; _gat_agregate=1; _gat_sklepagregate=1; _ga=GA1.2.2117847018.1430923777; language=pl-PL
Referer: http://www.host.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36

HTTP/1.1 200 OK
Accept-Ranges: none
Age: 1718
Cache-Control: public, max-age=864000
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 462
Content-Type: text/css
Date: Fri, 08 May 2015 10:20:37 GMT
ETag: W/"WA42c972a572376dab"
Expires: Mon, 18 May 2015 10:20:37 GMT
Last-Modified: Tue, 22 Apr 2014 12:56:40 GMT
Server: 
Vary: Accept-Encoding
X-UA-Compatible: IE=Edge
X-WA-Info: [V2.S10101.A82290.P94462.N13694.RN0.U947762373].[OT/all.OG/includes]

Reload, cache primed

GET /Portals/0/portal.css;wa42c972a572376dab?cdv=545 HTTP/1.1
Host: www.host.com
Accept: text/css,*/*;q=0.1
Accept-Encoding: gzip, deflate, sdch
Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control: max-age=0
Cookie: .ASPXANONYMOUS=ksN9_Z2-0AEkAAAAMWU0NGU1M2QtZWYxNy00ZjYzLTllM2UtODBiZTM1ZGRiNWQ40; ASP.NET_SessionId=0qsuljchcmws3rnxe5u1mrh4; _gat=1; _gat_agregate=1; _gat_sklepagregate=1; _ga=GA1.2.2117847018.1430923777; language=pl-PL
If-Modified-Since: Wed, 08 Oct 2014 09:23:55 GMT
Referer: http://www.host.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36

HTTP/1.1 304 Not Modified
Accept-Ranges: none
Age: 2007
Cache-Control: public, max-age=864000
Connection: Keep-Alive
Content-Type: text/css
Date: Fri, 08 May 2015 10:25:26 GMT
ETag: W/"WA42c972a572376dab"
Expires: Mon, 18 May 2015 10:25:26 GMT
Last-Modified: Tue, 22 Apr 2014 12:56:40 GMT
Server: 
X-UA-Compatible: IE=Edge
X-WA-Info: [V2.S10101.A82290.P94462.N13694.RN0.U947762373].[OT/all.OG/includes]

I am not HTTP expert but for me conditional get does not makes any sense. Why it's performed? Tested in both Chrome 42.0.2311.135 and Firefox 37.0.2 (on Win2008 srv).

I was reading some post about Chrome behaving like that - sending conditional GET even if object in cache is not expired (seems to be something similar looking at Cache-Control: max-age=0 in reload request). But the same for Firefox as well? Is that kind of bug feature? If so is there any way to modify AAM to force browser not do that?

I did additional test (this time using Wireshark not browser plugins) and result was:

  • Browser opened (cache is primed), url entered, only GET for / in Wireshark, no other request
  • Reload used - request for all objects in Wireshark bith OK 200 and 304 Not Modified

I am a bit lost what's going on.

Piotr

2 Replies

  • Did you ever get this figured out Piotr? I am in the same boat. Thanks.

     

  • Hi,

     

    Well, yes. That is how browsers work, if Reload button is used browser is always requesting objects from the source, even if all are cached and not stalled. Nothing to do with AAM and IBR.

     

    Piotr