[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

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
0
rdf
Asked:
rdf
1 Solution
 
bigbedCommented:
Yup you're right.
Depending on your browser and/or server, they can either interpret the filename (.txt, .gif, .jpg, etc) or sometimes the content and decide whether they can display it themselves, or whether you'll be asked if you want to save it to your disk.
0
 
TTomCommented:
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
0
 
shiversCommented:
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
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
rdfAuthor Commented:
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
0
 
chewymonCommented:
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.
0
 
rdfAuthor Commented:
thanks bigbed, thanks everyone

rdf
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now