Help! HTML files won't load from local drive?

Discussion in 'Web Design and Development' started by carbonmotion, Aug 20, 2013.

  1. macrumors 6502a

    carbonmotion

    Joined:
    Jan 28, 2004
    Location:
    San Francisco, CA
    #1
    I have a folder with a complete site that someone emailed me. After I click on the index.htm file the site won't load completely on chrome from the local source. However, when I upload it to the web, chrome loads it fine. Can anyone help?
     
  2. macrumors 65816

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #2
    Is it using some javascript pulled directly from the web?
    PHP pulling from a database ( doubt it ) if all you did was upload it?

    I really have no idea why a static site would work remotely, but not locally?

    I'm putting my thinking hat on.
     
  3. thread starter macrumors 6502a

    carbonmotion

    Joined:
    Jan 28, 2004
    Location:
    San Francisco, CA
    #3
    yeah its loading like a .js file from a server somewhere
     
  4. macrumors newbie

    Joined:
    Sep 21, 2006
    Location:
    Devon,UK
    #4
    Unfortunately Chrome does not load .html files on a local drive (as far as I am aware).

    Have a search on on google and you will find plenty of discussions about this and some possible solutions, including some plugins - none of which have worked for me.

    Let me know if you have better luck!
     
  5. thread starter macrumors 6502a

    carbonmotion

    Joined:
    Jan 28, 2004
    Location:
    San Francisco, CA
    #5
    It won't load on safari either! How am I suppose to develop a website without test browsers? #fail
     
  6. macrumors newbie

    Joined:
    Sep 21, 2006
    Location:
    Devon,UK
    #6
    Actually I just tested my own theory to find it false. I think it might be best to ignore my advice.

    I had a similar problem (and still do) with some content I created on a Windows machine and when viewing it through Chrome it did not load - but in other browsers it was fine. But on my Mac through Chrome it works fine...

    Need to investigate and start my own thread now - sorry.
     
  7. thread starter macrumors 6502a

    carbonmotion

    Joined:
    Jan 28, 2004
    Location:
    San Francisco, CA
    #7
    the .html file only loads partially for me in all browsers (chrome, safari, firefox)...
     
  8. macrumors 6502a

    Apple Key

    Joined:
    Jan 4, 2012
    #8
    I would work through the file step by step. Make sure there is no server code in the file (even though the extension is HTML, there could still be some). Next, I would try deleting all JS on the page, and see if that helps. Then remove CSS references.
     
  9. macrumors regular

    Joined:
    Aug 12, 2008
    Location:
    Cambridge, UK
    #9
  10. thread starter macrumors 6502a

    carbonmotion

    Joined:
    Jan 28, 2004
    Location:
    San Francisco, CA
    #10

    would it solve the problem if i just bought coda 2? i don't want to go back in and change a bunch of stuff just to change it back later.....
     
  11. macrumors 65816

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #11
    How about trying to clear your cache.?

    Maybe your browser is REALLY not wanting to accept the changes. I normally don't find this in Chrome, only IE fights with me on this normally.
     
  12. macrumors 6502a

    Apple Key

    Joined:
    Jan 4, 2012
    #12
    That probably wont solve the problem. I understand not wanting to change things, and then need to change them back. I was thinking that this might help to isolate the issue. I would guess that it is a particular line of code.

    You mentioned that the page partially loads and this leads me to believe that it may be having trouble rendering (or loading) the rest of the content past that point.

    When you have run this site from a web server, was it from your own personal server or the person who's site this is?

    If you're able to share the HTML page, I'd be happy to take a look at it.
     
  13. macrumors 65816

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #13
  14. macrumors 65816

    Joined:
    Jun 18, 2010
    #14
    There are a lot of differences to running a file locally. It won't process any server side includes, paths may not resolve correctly, services won't exist, etc.

    The short answer is to run a web server on your local machine and deploy the pages there. The long answer depends on what the pages are trying to do.
     
  15. macrumors member

    Joined:
    Apr 20, 2011
    #15
    To add to this, if you want to run a web server from your computer I would recommend you download MAMP, copy the files from where your index.html file is to /Applications/MAMP/htdocs/ folder and go to http://localhost:8888 in your browser.

    If this fails either copy the index.html source code here or give us a link to the site :)
     
  16. macrumors newbie

    Joined:
    Aug 23, 2013
    #16

Share This Page