eww lately for browsing the web looking for documentation and things like that. I dislike that
eww receives the same web page as it were Firefox or Google Chrome, it cannot render web pages as those web browsers do. Then, what I want to achieve is to make
eww tell the web sites that it visits that send the mobile friendly version of their web pages, thus, I would have a simpler layout rendered by
eww (or at least that's my assumption).
eww uses the
url library, so we can add advice to
url-http-user-agent-string to fake the
(advice-add 'url-http-user-agent-string :around (lambda (ignored) "Pretend to be a mobile browser." (concat "User-Agent: " "Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30")))
I took a mobile browser User-Agent string from
With this advice I get the mobile version of
google.com; your mileage may vary.
(I found this by using
M-x apropos RET user-agent RET.)