HTML files not updating on local server!

Discussion in 'Web Design and Development' started by dauber, May 23, 2016.

  1. dauber macrumors regular

    dauber

    Joined:
    Jan 10, 2012
    Location:
    Chicago
    #1
    Tech specs in my sig...

    Problem: I'm doing some web development on my 2015 MacBookPro, latest version of OSX El Capitan.

    Well...weird thing is....when I'm running off the localhost, my HTML changes are no longer being served! I'm still getting HTML tags that were long deleted from the source code.

    I know, your first reaction: clear browser cache. Fine. I did. Still getting the old HTML. Just to make sure I'm not going nuts, I installed Opera. Brand new install. Opera was never ever installed on this MacBookPro unless some joker in China temporarily futzed with it at the factory. Opera was still serving the old code.

    That tells me that Apache is caching stuff, despite "common knowledge" that it does not cache stuff on OSX.

    How do I flush the cache? Or if not necessarily flushing the cache, how do I get it to serve my changes??? I tried htcacheclean but it complains about the syntax, no matter what I try: htcacheclean -r, htcacheclean with a specified path, etc.
     
  2. 960design macrumors 68000

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #2
    Are you using the Apache that came with the Mac or something like MAMP? Either way, it seems like you may have accidentally pointed to a separate htdocs folder ( or whatever folder you used in the past; I use MAMP and www )
     
  3. dauber thread starter macrumors regular

    dauber

    Joined:
    Jan 10, 2012
    Location:
    Chicago
    #3
    Same folder I've always used. Weird thing is the JavaScript is changing, but not the HTML. (And I only have one copy of the code, so there's no possible way it could be coming from other than the one directory.)

    And yup, it's OSX's in-built Apache.
     
  4. 960design macrumors 68000

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #4
    Well, that is strange.

    Permissions error?
    Have you tried turning it off and on? ;)
    What editor are you using? Could the server be grabbing an older version of a versioned html file?
    I'm really trying to think of completely off the wall things here!

    I got nothing...
     
  5. dauber thread starter macrumors regular

    dauber

    Joined:
    Jan 10, 2012
    Location:
    Chicago
    #5
    Yep, tried turning it off and on. This is a days-old problem, btw....several shut-downs and startups all the way! I *am* using git, so it theoretically could be grabbing from an older branch, but the thing is...the controller file is actually generating the HTML via a $scope variable....and it most definitely *is* serving changes I make to functions in the file, but not to $scope variable assignments! The strings are not changing! Weird. Even the folks on stackoverflow didn't reply to my question.

    I might try an alternate method though.
     
  6. 960design macrumors 68000

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #6
    I am sure you have tried this, but going to mention it.
    Start up Incognito Mode and access your page. This will prevent the browser from grabbing any .localstorage / .sessionstorage variables that might be overwriting your scope variable.

    Again, really stretching here. I just do not know.

    Also try accessing your server with another computer on the same network ( bonjour services ) will zero configure a DNS connection... you know all of this. Just use an iPad, your iPhone, another mac or a windows computer with Bonjour to view your local webpage.
     
  7. dauber thread starter macrumors regular

    dauber

    Joined:
    Jan 10, 2012
    Location:
    Chicago
    #7
    Well, I did what was probably a much more sane way of handling the situation, at least for Angular standards. :)

    I simply got rid of those $scope variables and put those strings in div tags that had "ng-if" directives. Problem solved!
     

Share This Page