Loading recent posts...

Jun 19, 2013

Use Port Forwarding in Chrome to Push Localhost Pages to a Mobile Device




Google is sharing an interesting way of using port forwarding in Chrome. Port forwarding is an experimental feature useful when doing remote debugging on a mobile device, for example.

With remote debugging, developers can see how a page looks on the mobile device, but use the desktop Chrome tools to debug it. A problem is trying to do the same with a local file on your computer. In the early stages of development at least, it's much easier to simply load a file you're working on locally in Chrome rather than put it on a web server. Even using a local web server is easier and faster. Being able to push that file to a mobile device while continuing to work on it locally is quite useful. Developer Umar Hansa has figured out a way of doing this with port forwarding and the Chrome to Phone extension.

First, he pushed the localhost URL to the mobile device. The page doesn't load, obviously, but you can debug it remotely all the same. Then he mapped out a specific port on the localhost on the mobile device to the localhost on the desktop, making it possible to view pages ran locally on the computer without knowing its actual IP address.

Chrome Port Forwarding
Image credits to Umar Hansa

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes
`