I'm having troubles on my local dev environment with Chrome since an unknown moment in the past, some request (I would say about 90% of them) are really slow, it takes about 10 secs to start transfering data.

This is what my Network inspector looks like.

I'm running Mac OS X (Lion, but it's been happening before) and MAMP as local web server. It also happens with Apache2+PHP5 installed through MacPorts.

It only happens on Chrome, the web server works as expected on Safari and Firefox. My about:version says this:

Google Chrome 12.0.742.122 (Official Build 91910)

I tried enabling DNS Pre-fetching but the option is gone, I'm not sure since when while it updates by itself.

My /etc/hosts looks like this:

#DEV
127.0.0.1       website1.local
127.0.0.1       website2.local
link|improve this question
- did you try with chromium? - are you using chrome extensions that might trigger this? – Alex Barredo Jul 24 '11 at 17:16
@Adirael, does it happen with other file-types like JPG, etc. or only with PHP files? Try navigating directly to some non-PHP files on your server to check. – Synetech Jul 24 '11 at 17:37
Happens too pointing to a JPG with all extensions disabled, same behavior as with PHP files: sometimes fast as lighting, but most of them slow as a turtle. – Adirael Jul 24 '11 at 18:06
feedback

1 Answer

up vote 5 down vote accepted

thee matter is Lion handles .local TLD differently because it's reserved for some Multicast DNS features (used by Bonjour). The only way i found to solve this issue is using a different TLD for development hosts (ie: .dev). It works fine for me

link|improve this answer
Seems to be working, I changed to .dev and now they're fast. Weird thing is on Firefox they worked OK, maybe Firefox caches the DNS requests and Chrome is not doing it anymore. – Adirael Jul 30 '11 at 23:19
feedback

Your Answer

 
or
required, but never shown

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