This is probably the easiest way to test your websites on a mobile device, especially if you don’t have a server to host your site: (and it came to me when I wanted to test mine last night)
- Run a localhost on your machine, may it be express, Apache, or anything that responds to HTTP requests.
- Find out your machine’s IP address in its local network.
- Connect your phone or tablet to the same local network with your “server” in it.
- Visit <host_ip>:<port> on your mobile browser.
That’s it – start playing with your site on the mobile device! The best part is, every time you update something, just refresh on your mobile browser and the change is there. How can that be any simpler!
Below is how this post looks on my Xperia S. I’m using Octopress preview, and it runs on port 4000 by default.