Viewing local changes to website on separate device

I'm trying to figure out how to do something, and I can't quite seem to get it to work. Let me describe the situation:

Using a hosts file, we redirect the resources (CSS/JS/etc) of a website, let's say, to our local machine

We then can do some development on any JS/CSS/etc on our local machine. Let's say the only change we do is making the background: green;.

This allows us to see our changes to the website, without messing with anyone else's view. Only our computer can see the green background when we go to; if anyone else goes there, they don't see it. E.g., if a resource, the.css on the website is located at, we can have our own version of the.css on our local machine somewhere ( that is loaded instead (assuming I've set up the hosts correctly, which I have).

Here's where my problem comes in: I want to be able to see these changes on other devices, such as a phone. That is, when I go to on a different device, such as my phone, I want to see the green background. Note that I want to do this without changing the files on

How can I do this? (Please note: I have to develop on OSX :P)

Steps I've taken: I've tried sharing internet with the phone (have my laptop broadcast WiFi that my phone can connect to), however, despite the laptop being able to see the green background, my phone can't. It seems the phone ignores the hosts file on the laptop, even though the laptop is what is supplying the internet.

Thanks all :)


Also, I'd like to clarify:

Only our local machine (let's say our laptop) has the changes. The server and the second device (let's say our phone) do not have the changes. Ideally, no changes should be made to the second device (e.g., the second device's hosts file) in order for it to see the green background. That is, the second device should just connect to the laptop or something like that and be able to see the changes as well.


Category: web development Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.209 (s). 12 q(s)