wget & curl are very good command line tools to test and pretend to be any browser. Here I’m testing Google webservers and support for content compression.
# pretend to be Firefox 1.5
wget –server-response –user-agent “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5″ –header=”Accept-Encoding: gzip, deflate” http://www.google.com
# pretend to be IE6
wget –server-response –user-agent “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)” –header=”Accept-Encoding: gzip, deflate” http://www.google.com
Testing Google JavaScript Compression
wget –server-response –user-agent “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)” –header=”Accept-Encoding: gzip, deflate” http://www.google-analytics.com/urchin.js
wget –server-response –user-agent “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)” –header=”Accept-Encoding: gzip, deflate” http://pagead2.googlesyndication.com/pagead/show_ads.js
Connecting to pagead2.googlesyndication.com|64.233.187.104|:80... connected. HTTP request sent, awaiting response... HTTP/1.0 200 OK P3P: policyref="http://www.googleadservices.com/pagead/p3p.xml", CP="NOI DEV PSA PSD IVA PVD OTP OUR OTR IND OTC" Last-Modified: Thu, 29 Dec 2005 19:55:11 GMT Content-Type: text/javascript; charset=UTF-8 Content-Encoding: gzip Server: CAFE/1.0 Cache-Control: private, x-gzip-ok="" Content-Length: 2268 Date: Wed, 18 Jan 2006 22:03:43 GMT Connection: Keep-Alive Length: 2,268 (2.2K) [text/javascript]
Leave a Reply