Link to home
Start Free TrialLog in
Avatar of rdf
rdf

asked on

files in same dir

Hi,
  I created a website, and I linked to other documents in the same directory.
The other documents are'nt coded in html, they are just text doc's. I had thought that each file had to be saved as htm or html, and needed html tags.

I guess this is not so, am I correct?
I am able to click these links to text documents and my browser displays them fine.

thanks
rdf
ASKER CERTIFIED SOLUTION
Avatar of bigbed
bigbed
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TTom
TTom

The documents also do not need to be in the same directory.  Other files are treated the same as HTML documents, only the "display" mechanism may be different.

Tom
you can link to _any_ sort of document.  A line in the HTTP response header indicates to the browser what sort of file it is - and the browser then decides what to do with it according to it's configuration.  most browsers these days can display internally most plain text formats, most images, etc - any unrecognised file type will cause the user to be asked whether they want to save it or open it with an associated application
Avatar of rdf

ASKER

Then the only page that needs html tags is the index? If you are able to link to non-html formatted pages, why code the other pages as html? Is it because that the first page the browser loads might not be the start page(index)?

thanks
rdf
The only problem you mgiht run into is settings on the client machine.  Depending on how it is set up, the txt files may show in the browser, NotePad or other text editor, or prompt you for a download.  Depends on the browser and how the associations are set on the client.
Avatar of rdf

ASKER

thanks bigbed, thanks everyone

rdf