Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
This might be better of Super User. The main setup and work will be done on the PC, not the iPhone. – Nathan Greenstein Apr 12 '11 at 17:54
@nathan +1 for Super User – nuc Apr 12 '11 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. – Jason Salaz Apr 12 '11 at 23:43
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 '11 at 4:25
up vote 1 down vote accepted

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:

share|improve this answer
but how my iphone will open my computer's ip address. it's not connected on LAN – Metal Gear Apr 13 '11 at 5:00
How do you use FTP to upload files if your computer isn't connected? – Jason Salaz Apr 13 '11 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 '11 at 12:43
Ah, that makes sense. Atypical, but sensical. – Jason Salaz Apr 13 '11 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.

share|improve this answer

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.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.