Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Elliott Frazier
PLUS
Elliott Frazier
Courses Plus Student 9,647 Points

Page wont update when I refresh it.

First of all I would like to say that I just purchased my first Macbook the other day, so I'm pretty new to everything on here.

I started doing a little coding today and I noticed that when I would refresh the browser to see the changes I made to my code the page refreshed but the changes I made didn't, until about the 6th time I refreshed it (about 15 seconds later). this is still happening and I sadly have no idea how to fix it. if anyone can help, it would be great!

I've tried to use Chrome, Firefox, and Safri.

Are you simply coding in your text editor, saving your files, then refreshing your browser or are you using a more advanced workflow, e.g. WordPress development or something else involving a local server?

Elliott Frazier
Elliott Frazier
Courses Plus Student 9,647 Points

I was doing simple HTML. although I am using a localhost.

5 Answers

Elliott Frazier
PLUS
Elliott Frazier
Courses Plus Student 9,647 Points

Found the problem! for future references, this is what I did:

  1. open MAMP.
  2. click preferences.
  3. then choose the 5.2.17 PHP version.
  4. set cache to "--"

I don't know why MAMP isn't working correctly for the latest version of PHP. hopefully the version differences wont matter to much.

Hope this helps someone out!

Next time this happens try holding the shift key when hitting refresh. Usually the no refresh issue is usually with browser caching.

Elliott Frazier
Elliott Frazier
Courses Plus Student 9,647 Points

Tried it, and it's still not refreshing. have any other tips?

Elliott Frazier
Elliott Frazier
Courses Plus Student 9,647 Points

I have found another problem that you might be able to help with. for some resin when I make a mistake with my php code, MAMP doesn't give me a hint of where my error occurred like it would on XAMMP. Ex: unidentified variable on line 26 (or something like that). would you how how to fix this?

Stone Preston
Stone Preston
42,016 Points

navigate to Applications/MAMP/bin/php/php5.4.10/conf/php.ini

change

display_errors = Off

to

display_errors = On

restart your server and see if that fixed it.

Holding shift while refreshing just worked for me.

While running mamp HTML would update instantly with a refresh, but CSS didn't work. If I opened the file in the browser it worked, though.

After pressing shift+command+refresh I am no longer having this problem..

Elliott Frazier
PLUS
Elliott Frazier
Courses Plus Student 9,647 Points

This problem seems to only occur when using my MAMP local host.

Stone Preston
Stone Preston
42,016 Points

ive noticed the same, so im curious as to how you can fix it, or if you can at all. In the videos nobody ever has to restart his server to see changes. I find I always have to restart my server to see changes.

Randy Hoyt might be able to help

Elliott Frazier
Elliott Frazier
Courses Plus Student 9,647 Points

I think we better tag Hampton Paulk instead since Randy isn't with Treehouse anymore.

Stone Preston
Stone Preston
42,016 Points

oh interesting. Didnt know that he left