hey all,

i'm trying to update our company website and i usually dont do it but my programmer is not around and i just need to add one link to it. on this website, there are really no links that open documents, just opens text on that web page youre viewing. i need a link added that can open a pdf document. below is what was in there originally which just pointed to another page on our site:

<a href="/bios/">more</a></b>

now i'm assuming that since this brings you to a bios page and the link you click says "more", the bios portion is where i need to add the path of the document. i dont know the syntax to add that path....can anyone help me?? i dont know what code this is written in either. so hopefully someone can help...if you need more info, let me know.

thanks!

Dani AI

Generated

A quick follow-up to what and discussed: linking straight to a PDF is the right approach, and there are a few tidy options and checks that make the behavior predictable across browsers and servers.

To open the file in a new tab (with the usual security flag) or to hint the browser to download the file, use variations of the anchor element. Examples:

<a href="https://example.com/docs/employee-handbook.pdf" target="_blank" rel="noopener">Employee handbook (PDF)</a>
<a href="/docs/employee-handbook.pdf" download="Company-Handbook.pdf">Download handbook</a>

Note: the download attribute is convenient but has cross-origin and browser-compatibility caveats; see the MDN notes on the anchor element download attribute.

To force a download or control whether the PDF displays inline, set appropriate HTTP headers from the server:

Content-Type: application/pdf
Content-Disposition: attachment; filename="Company-Handbook.pdf"

See MDN on the Content-Disposition header for details.

Troubleshooting checklist:

  • Test the file URL directly in the browser to see the HTTP status and headers.
  • Watch the Network tab (DevTools) to confirm Content-Type and Content-Disposition.
  • Check filename case and exact path (Linux servers are case-sensitive).
  • Ensure file permissions allow web access (no 403).
  • If the site uses a CMS or routing, upload via the media manager and use the generated URL.
  • For sensitive files require authentication; don’t rely on an unlisted URL.
  • Optimize large PDFs for faster download and user experience.

Browser display behavior varies, so test in Chrome, Firefox and Edge after making changes.

It would be something like this:

<a href="/bios/MyFile.pdf">Download PDF</a>

You would need to place the pdf document in that folder on the webserver.

that worked...thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.