@SimonQ Just out of curiosity, have you tried loading the URL in Chrome's Incognito mode?
php artisan serve serving old content on Chrome
I just created a new project and whenever I run php artisan serve to call the localhost:8000 server it seems to be pointing me to another project that I have not touched in a while.
This only seems to be happening in Chrome, it works fine on Safari and Firefox.
I have tried clearing my cache on Chrome and still can't seem to figure out what is going on.
Any help would be great!
I just tried it, same result though
Are all three of the browsers on the same machine? I'm assuming they are, but just making sure to not make assumptions.
Yes, @goatshark they are all on the same machine running locally
@SimonQ Yes, very strange indeed. All of the things I'm thinking about to suggest checking are kind of moot points since this is working in the other browsers. Vagrant files, homestead.yml, local /etc/hosts would all cause the same problem in the other browsers if the problem were in any of those. I have had the same behavior from Chrome in the past where I can't seem to get it to, you know, "move on" and take host changes. If I were the type to suggest rebooting, I would, but I'm not..... just saying. Make sure to kill any Chrome processes that are running to make sure it is completely restarted. I'm sure you've already been down that road though. I'll do some poking around here. Very strange.
Thanks @goatshark the first thing I did was reboot and restarted Chrome from start it still seems to be having the same issue however. It really is a pain as I mostly use Chrome for it's dev tools! haha
What happens if you clear the history and cache then does it work correctly?
@jlrdw That was one of the first things I did, same result.
You said you rebooted and restarted Chrome are you sure you completely cleared the history and cache? You could also actually delete any temporary files that Chrome creates on the computer to see if that helps something is wrong here.
@jlrdw It was in my original post. I clicked Clear Browsing Data under chrome://history/
What are these temporary files you're suggesting that Chrome creates?
Under more tools clear browsing data.
See previous reply plus I forgot to mention clear since the beginning of time not just the past hour which is default.
Same result.
@SimonQ Have you tried harsh language? I sometimes find that name calling and threats help. Kidding, of course (but not really). I'm still digging around here.
@goatshark Sorry, didn't mean to come off as harsh! I'm still digging around too.
Did you clear from the beginning of time in the drop-down like my above reply?
Yes @jlrdw .... it is still producing the same result
There's an option somewhere in chrome to disable cache try that.
This is a puzzler. Have you tried updating Chrome to the latest version? Let me add that I have seen a lot of problems with chrome mentioned on the forum? But I do like the development tools in Chrome. Also search Google for this maybe there's a known issue not corrected yet.
I know this is really reaching, but have you tried to serving it up on something other than 8000? If the problem is Chrome being insubordinate, maybe changing the port is enough for it to actually 'get' the new site instead of pulling whatever it has from cache (not that we've proven it's coming from cache, quite the opposite I think). Might not be helpful, but it's easy enough to test.
@jlrdw I'm on the latest version of Chrome
@goatshark I just tried to do it on port 8001 and 8080 but I am getting a new error: This site can't be reached localhost refused to connect.
I tested this on different browsers, Safari and Firefox seems to be ok but not Chrome...
@SimonQ I found something similar reported here: http://stackoverflow.com/questions/32171725/chrome-cant-open-localhost3000-with-gulp-browsersync
Now, this does not even begin to explain the root cause, but might be worth trying. Commenting out the IPv6 hosts file entry for localhost should have absolutely nothing to do with they symptoms you're experiencing, but since we're swinging around in the dark here, it might be worth a try for testing purposes if nothing else.
And actually, while you're in the /etc/hosts file, make sure there is an entry for localhost to resolve to 127.0.0.1. Maybe non-chrome browsers are being helpful (and reasonable) and assuming localhost is, well, localhost(127.0.0.1). If you don't have an entry in there for this, perhaps Chrome is just being a pedantic b*tch.
Chrome is just being a big pain now... just tried changing what you suggested through the link and still the same thing @goatshark
@SimonQ What happens when you visit http://127.0.0.1:8000 in each of the browsers?
Hmm, it says the server can't be reached now.Can't connect to the server "127.0.0.1".
I'm also receiving a "This site can't be reached" on Chrome as well when I visit localhost:8000... I didn't change anything either since yesterday
PHP cli is running behind in process, end that task using Task Manager (if you are in Windows).
then run: php artisan serve
inspired by: https://stackoverflow.com/a/59037810/11795142
Please or to participate in this conversation.