Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Web Server Configuration _ Public Drive Issues

Posted by: skania Feb 26 2016, 11:51 AM

Hey all

I have recently started learning and developing my HTML skillset, but I am running into an error of which I cannot find a solution.

For work, I am trying to set up a simple HTML document for my department to use. In creating the HTML, CSS, and JS files, I used a folder on my desktop. When copying this folder, and moving it to our public shared network folder, the page is not displaying the same, and the functionality is not present.

The sheet is basically a series of paragraphs, similar to a database or dictionary. Each section includes a descriptive sentence, and a section of SQL code that the sentence describes. Below each code section is a "Copy Query" button, which I used clipboard.js to create.

On the desktop version, opening in IE, this file works fine and the intended selection is copied when hitting the button. However, on the network version of this HTML file, the copy button does not work, and the CSS styling looks slightly different.

Any help understanding the difference between local hosting and public drive hosting of this file would be greatly appreciated! Or if I am moving in the wrong direction asking for advice, that would also be appreciated.

Files can be provided if necessary.

Posted by: pandy Feb 26 2016, 12:22 PM

Did you use relative URLs to external CSS and JS files and is the file structure the same on the server as on your desktop?

If you link to the page we may be able to offer better advice.

Posted by: skania Feb 26 2016, 12:33 PM

I have all the documents included in a folder called "SQL"

I attached the HTML file and a picture of the folder


Attached thumbnail(s)
Attached Image

Posted by: pandy Feb 26 2016, 12:42 PM

Looks alright to me. Are the file named style.css and script.js, i.e. all lower case?

Posted by: skania Feb 26 2016, 01:00 PM

Yes they are, adding a couple more screenshots to help. I am just wondering if there are certain rules that apply to the public drive folders that may be affecting this?

In the local file, you can see my border-radius CSS style is showing up, but on the network file, it isn't.

The transfer of the folder from local (Desktop) to the network drive was literally a copy and paste, so the markups should be the same. Correct?


Attached thumbnail(s)
Attached Image Attached Image Attached Image Attached Image

Posted by: skania Feb 26 2016, 01:11 PM

Here is the CSS


Attached File(s)
Attached File  style.css ( 394bytes ) Number of downloads: 810

Posted by: pandy Feb 26 2016, 02:55 PM

One reason could be the files aren't served with the right content type. That could stop them from being read. But some of the CSS is actually working, right?

Posted by: pandy Feb 26 2016, 03:34 PM

If this is a public website you can use for example this tool to check what content type is used. Feed it the URL to the CSS and JS files, not the HTML file.
http://www.rexswain.com/httpview.html

If the server isn't configured to send any special content type it will default to text. Should be text/css and text/javscript. If it's something else someone has made a mistake.

You find it under "Receiving Header". Here's the output for http://htmlhelpl.com/style.css .

CODE
Receiving Header:
HTTP/1.1·200·OK(CR)(LF)
Date:·Fri,·26·Feb·2016·20:35:15·GMT(CR)(LF)
Server:·Apache/2.0.51(CR)(LF)
Last-Modified:·Wed,·03·Oct·2007·18:31:51·GMT(CR)(LF)
ETag:·"2a004d-1070-e216f3c0"(CR)(LF)
Accept-Ranges:·bytes(CR)(LF)
Content-Length:·4208(CR)(LF)
Vary:·Accept-Encoding(CR)(LF)
Cache-Control:·max-age=604800(CR)(LF)
Expires:·Fri,·04·Mar·2016·20:35:15·GMT(CR)(LF)
Connection:·close(CR)(LF)

Content-Type:·text/css(CR)(LF)
^^^^^^^^^^^^^^^^^^^^^^
(CR)(LF)

Posted by: skania Feb 26 2016, 04:08 PM

I think something like that may be the issue.

To test, I placed the whole SQL folder on the public drive, and logged on to a separate machine. I opened the file on the network drive, and it still did not do the border-radius CSS, but it had the other CSS elements (just like the attached picture). The Copy button did not work either.

However, I right-click Copied the SQL folder to the desktop of that computer, and opened the SQL html page. It had all the CSS elements and the copy button worked!

So does this sound like a setting of the network drive? or a specific folder on the drive?

Posted by: pandy Feb 26 2016, 04:24 PM

Maybe I've misunderstood you. Do you view this over a server at all? If not content-type isn't used. And if it is on a server none of the style sheet would work if the wrong content-type was used.

Sorry, I can't think of anything else.

Posted by: skania Feb 26 2016, 04:31 PM

That's ok, Im doing my best to explain this because I am stuck at a block until I can figure it out, and I know you are the experts : )

The file displays all CSS and JavaScript correctly when loaded from my Desktop file. When opening, I do have to hit "Allow blocked content" on Internet Explorer though.

If I move this to our shared network drive and open it, the HTML document displays with some CSS elements missing, and the Copy button does not work (which comes from clipboard.min.js in the JS/ folder).

Are there settings for drives / folders which can affect how the HTML document interacts with JS and CSS?

Posted by: skania Feb 26 2016, 05:06 PM

Wow so I think I just solved the issue in research

I added
<!-- saved from url=(0014)about:internet -->
above <!DOCTYPE html> in the document.

Anyone know exactly why this would work?

Posted by: pandy Feb 27 2016, 04:49 AM

Mark of the Web. An IE issue. So I take it no server is involved then.

https://msdn.microsoft.com/en-us/library/ms537628(v=vs.85).aspx

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)