I make mobile optimized websites and I develop websites on my Windows 7 Desktop. Whenever I want to see any .html file on iphone to check compatibility I upload the file to an online FTP then I open the file from that url.

But the whole thing takes so long each time.

I've got XAMPP installed but no wifi on my desktop - just on the router.

Is there any way to open on iPhone's Safari browser a .html file located at my PC's Desktop?

  • 2
    This might be better of Super User. The main setup and work will be done on the PC, not the iPhone. Apr 12, 2011 at 17:54
  • 1
    @nathan +1 for Super User
    – nuc
    Apr 12, 2011 at 17:57
  • I generally agree that this is a Windows question. Not an Apple question. The question is how to serve web content on a Windows Desktop. Apr 12, 2011 at 23:43
  • 1
    My question is not how to install web server on PC, I know this I'm using XAMPP from 2-3 years. my question is there any specific things to run local from iphone. my iphone is not directly connected to my PC. I don't have wireless card on my PC. I'm having wireless router. to use internet on my ipad and iphone using wi-fi
    – Metal Gear
    Apr 13, 2011 at 4:25

5 Answers 5


XAMPP has long since been a staple of simple personal web hosting by Windows-using friends' of mine. Allow me to repeat this, I have NEVER used XAMPP myself, it only comes recommended by friends of mine.

This gist of this process is that you need a web server running on port 80 on your desktop machine. And you also need to know what it's internal IP addresses is.

Assuming you use XAMPP, download it, get it installed and configured to run on port 80. Check to ensure Windows Firewall opened up port 80 for it. Next, drop your web files into XAMPP's web serving directory.

Then, fire up your iPhone, and open Safari. Browse to your computer's IP address / index.html or the file's given filename. (Ex:

  • but how my iphone will open my computer's ip address. it's not connected on LAN
    – Metal Gear
    Apr 13, 2011 at 5:00
  • How do you use FTP to upload files if your computer isn't connected? Apr 13, 2011 at 5:24
  • I think he's saying (hopefully he'll correct me if I'm wrong) that his phone isn't on his network. If his network is wired-only, that makes perfect sense.
    – Ben Wyatt
    Apr 13, 2011 at 12:43
  • Ah, that makes sense. Atypical, but sensical. Apr 13, 2011 at 16:30

If you're willing to install ruby (already installed by default on OS X), you might want to check out Annyong. You can basically point it at any folder and tell it to serve it on an odd port.

If python is more your style (also installed by default on OS X), you can simply type python -m SimpleHTTPServer to serve the current directory on port 8080.

Otherwise, I sometimes use Dropbox for quick transfer to my iOS stuff.


You can install Microsoft's Internet Information Server on Windows 7 and then ensure your HTML files land in IIS's root directory. From there, it should be trivial to view them on your iPhone.

Of course, there are other web server options such as Apache, but IIS is pretty much the standard in Microsoft-land and you'll probably find it easier to set up and troubleshoot, particularly given that your needs are minimal.


WAMP is the "easiest" solution, if you don't have experience with running a local webserver.



Short answer is no. There is nothing special you can do on iPhone's Safari to access a file on your desktop - not even using the USB cable.

That's the on topic answer, to this website. That being said...

Your best bet is connecting through wifi. Supposedly you could also use bluetooth or even USB, but for both you would sure need to jailbreak and I wouldn't bother even trying because I suppose any of them would be quite troublesome because most developers wouldn't bother doing something in those lines and because none of the two are meant to give direct access files remotely - just for copying over.

If you don't have a web server, grab any from other answers, such as XAMPP (my favorite), Annyong or even using Python, and make sure it's running on the desktop through your own desktop web browser pointing to url or simply localhost, which is a shortcut.

Then make sure your iPhone is on the same network and point your Safari to your computer's IP. Doesn't matter your desktop doesn't have wifi. For instance, if they're connected to the same router, by default they'll have similar IPs and same mask which will allow them to see each other on that same Local Area Network.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .