Forum Discussion
Puli
Jul 11, 2012Nimbostratus
How to ignore Some HTTP get on a page
We have four object references that are on every page in our website.
These four are actually not required to display the page but hey get downloaded by the browser. Each of these are about 400k in size
How can i ignore gets on these 4 objects when a get request comes in in IRule.
How do i respond to browser so it doesn't download the object ?
Any ideas
thanks,
Puli.
- nitassEmployeeis HTTP::respond applicable?
[root@ve10:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.19.79:80 ip protocol 6 rules myrule profiles { http {} tcp {} } } [root@ve10:Active] config b pool foo list pool foo { members 200.200.200.101:80 {} } [root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if {[HTTP::uri] equals "/hugefile.jpg"} { HTTP::respond 200 content "" } } } on client curl -i http://172.28.19.79/hugefile.jpg HTTP/1.0 200 OK Server: BigIP Connection: Keep-Alive Content-Length: 0 tcpdump on bigip i.e. no connection to pool [root@ve10:Active] config ssldump -Aed -nni 0.0 port 80 New TCP connection 1: 172.28.19.251(37066) <-> 172.28.19.79(80) 1342056660.8829 (0.0011) C>S --------------------------------------------------------------- GET /hugefile.jpg HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Host: 172.28.19.79 Accept: */* --------------------------------------------------------------- 1342056660.8830 (0.0000) S>C --------------------------------------------------------------- HTTP/1.0 200 OK Server: BigIP Connection: Keep-Alive Content-Length: 0 --------------------------------------------------------------- 1 1342056660.8846 (0.0016) C>S TCP FIN 1 1342056660.8846 (0.0000) S>C TCP FIN
- hooleylistCirrostratusWhy not set the correct cache control settings on the server or through an iRule to ensure clients use a cached copy of the four objects? Or you could cache them on LTM using RAM cache.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects