How to fetch a webpage as a mobile browser with curl on Linux?

Posted on In QA

On Linux, how to download a webpage as a mobile browser?

You can change the agent of curl to be a mobile browser’s and the remote webserver may be consider the request from a mobile browser:

curl 
-A "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) CriOS/28.0.1500.12 Mobile/10B329 Safari/8536.25" 
http://www.example.com/

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *