Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 20, 2013, 01:50 PM   #1
carbonmotion
macrumors 6502a
 
carbonmotion's Avatar
 
Join Date: Jan 2004
Location: San Francisco, CA
Help! HTML files won't load from local drive?

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?
__________________
Ignorance is the night of the mind, but a night without moon and star.
--Confucius
carbonmotion is offline   0 Reply With Quote
Old Aug 20, 2013, 02:10 PM   #2
960design
macrumors 6502a
 
Join Date: Apr 2012
Location: Destin, FL
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.
__________________
TI-99/4A, tape cassette, 12" B&W Zenith
960design is offline   0 Reply With Quote
Old Aug 20, 2013, 02:28 PM   #3
carbonmotion
Thread Starter
macrumors 6502a
 
carbonmotion's Avatar
 
Join Date: Jan 2004
Location: San Francisco, CA
Quote:
Originally Posted by 960design View Post
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.
yeah its loading like a .js file from a server somewhere
__________________
Ignorance is the night of the mind, but a night without moon and star.
--Confucius
carbonmotion is offline   0 Reply With Quote
Old Aug 20, 2013, 02:30 PM   #4
telephasic75
macrumors newbie
 
Join Date: Sep 2006
Location: Devon,UK
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!
telephasic75 is offline   0 Reply With Quote
Old Aug 20, 2013, 02:32 PM   #5
carbonmotion
Thread Starter
macrumors 6502a
 
carbonmotion's Avatar
 
Join Date: Jan 2004
Location: San Francisco, CA
Quote:
Originally Posted by telephasic75 View Post
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!
It won't load on safari either! How am I suppose to develop a website without test browsers? #fail
__________________
Ignorance is the night of the mind, but a night without moon and star.
--Confucius
carbonmotion is offline   0 Reply With Quote
Old Aug 20, 2013, 02:37 PM   #6
telephasic75
macrumors newbie
 
Join Date: Sep 2006
Location: Devon,UK
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.
telephasic75 is offline   0 Reply With Quote
Old Aug 20, 2013, 02:39 PM   #7
carbonmotion
Thread Starter
macrumors 6502a
 
carbonmotion's Avatar
 
Join Date: Jan 2004
Location: San Francisco, CA
Quote:
Originally Posted by telephasic75 View Post
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.
the .html file only loads partially for me in all browsers (chrome, safari, firefox)...
__________________
Ignorance is the night of the mind, but a night without moon and star.
--Confucius
carbonmotion is offline   0 Reply With Quote
Old Aug 20, 2013, 03:20 PM   #8
Apple Key
macrumors 6502a
 
Apple Key's Avatar
 
Join Date: Jan 2012
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.
__________________
You know what they say... once you go Mac you ain't never gonna go back.
Apple Key is offline   0 Reply With Quote
Old Aug 20, 2013, 04:47 PM   #9
Ap0ks
macrumors regular
 
Join Date: Aug 2008
Location: Cambridge, UK
Check the security policies in the browsers you're using, some tips on how to do that here -> https://github.com/mrdoob/three.js/w...things-locally

Alternatively (and probably the safer option), install a web server locally for testing, either by hand or using MAMP.
Ap0ks is offline   0 Reply With Quote
Old Aug 20, 2013, 05:21 PM   #10
carbonmotion
Thread Starter
macrumors 6502a
 
carbonmotion's Avatar
 
Join Date: Jan 2004
Location: San Francisco, CA
Quote:
Originally Posted by Apple Key View Post
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.

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.....
__________________
Ignorance is the night of the mind, but a night without moon and star.
--Confucius
carbonmotion is offline   0 Reply With Quote
Old Aug 21, 2013, 08:07 AM   #11
960design
macrumors 6502a
 
Join Date: Apr 2012
Location: Destin, FL
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.
__________________
TI-99/4A, tape cassette, 12" B&W Zenith
960design is offline   0 Reply With Quote
Old Aug 21, 2013, 10:41 AM   #12
Apple Key
macrumors 6502a
 
Apple Key's Avatar
 
Join Date: Jan 2012
Quote:
Originally Posted by carbonmotion View Post
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.....
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.
__________________
You know what they say... once you go Mac you ain't never gonna go back.
Apple Key is offline   0 Reply With Quote
Old Aug 21, 2013, 01:35 PM   #13
960design
macrumors 6502a
 
Join Date: Apr 2012
Location: Destin, FL
Try CSS and HTML code validation to find errors:

CSS
http://jigsaw.w3.org/css-validator/

HTML
http://validator.w3.org/

This might help, my thinking hat just broke.
__________________
TI-99/4A, tape cassette, 12" B&W Zenith
960design is offline   0 Reply With Quote
Old Aug 21, 2013, 02:13 PM   #14
Laird Knox
macrumors 65816
 
Join Date: Jun 2010
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.
Laird Knox is offline   0 Reply With Quote
Old Aug 22, 2013, 09:19 AM   #15
-pete-
macrumors member
 
Join Date: Apr 2011
Quote:
Originally Posted by Laird Knox View Post
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.
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
-pete- is offline   0 Reply With Quote
Old Aug 24, 2013, 01:49 AM   #16
brainos
macrumors newbie
 
Join Date: Aug 2013
Quote:
Originally Posted by 960design View Post
Try CSS and HTML code validation to find errors:

CSS
http://jigsaw.w3.org/css-validator/

HTML
http://validator.w3.org/

This might help, my thinking hat just broke.
Those are good links.Try this .Then try again to load your site.
Sökmotoroptimering
brainos is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Recovering files from an MBP drive that won't boot zwodubber OS X 4 Dec 2, 2012 12:39 AM
Resolved: Safari can't load images/javascript/html 5 on certain website. Traisoon OS X 1 Nov 23, 2012 09:31 AM
Help! How to convert local HTML files to PDFs? timidhermit Mac Applications and Mac App Store 4 Oct 8, 2012 11:16 AM
S-L-O-W To Load Local Content soupy Apple TV and Home Theater 2 Oct 4, 2012 10:37 PM
Help to locate "browser" like app that can load LOCAL htm files? timidhermit iPad Apps 2 Aug 7, 2012 01:13 PM

Forum Jump

All times are GMT -5. The time now is 05:24 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC