Basic HTML

They have: 330 posts

Joined: Apr 2000

I am having trouble with the following issues. I'm sure they're easy to fix, but I'm pretty lost right now.

1. What is the code needed to always request the most recent version of a page as opposed to what's in cache?

2. When linking to a file, how would I make the file download instead of launch (txt, doc, xls, etc.)?

Thanks for any help.

mjames's picture

They have: 2,064 posts

Joined: Dec 1999

1. Put this in your HEAD tags:
<META http-equiv="pragma" content="no-cache">'

2. I'm not sure I understand your question. Can't you just link to the file name and it will prompt to download?

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Possible answer for question # 2: Zip the file!

They have: 383 posts

Joined: Sep 2000

Whether a file downloads or opens in your browser is based on your web browsers MIME settings. For example if user A tried to download a Microsoft Word document and has Microsoft Word 2000 the word document may open in his browser within the Microsoft Word viewer. On the other hand if use B tries for download a Microsoft Word document and has no Word viewer installed he will be prompted for what do with the file (open from server or save to disk).

One option is to ZIP the file (I don't care for this option) as Jack mentioned or you can suggest that the visitor "right click and select "save target as" to save this file to your hard drive". There should not be any problem linking most documents however documents with extensions that are used in browsers will usually trigger the browser to open them rather then save them.

They have: 330 posts

Joined: Apr 2000

Thank you for the replies.

1. The Meta thing is exactly what I needed, thanks.

2. That is pretty much where I'm at right now where it either downloads or launches depending on what's installed on the computer. The only reason I thought it should be possible is because yahoo! mail asks you if you want to view or download attachments. I don't know what they're doing different.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.