Hi, i have problem with PDF Files, even i already target the file _blank. The browser still automatically download the pdf files.
Is there HTACCESS code to block this feature?
Hi, i have problem with PDF Files, even i already target the file _blank. The browser still automatically download the pdf files.
Is there HTACCESS code to block this feature?
Last edited by davelf; 04-04-2013 at 04:24 AM.
No, not really. Different browsers behave differently and you shouldn't try to control them. There might be some tricks (I've seen more for forcing downloading, rather than by default not downloading), but they won't work 100%.
Are you trying to make this work just on your own computer or for some visitors (in certain browsers)? It might be possible. If not, there's no real point-- some browsers don't have PDF readers for example.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
i'm trying to make this work on all computer.
Well i find this rules:
1. .htaccess file
browser will likely open this file directly:
AddType application/pdf
and files described as this, browser most likely will DL and save:
AddType application/octet-stream .pdf
But like you already said in some browser it does't work.
This is something users can decide. For example, I've set my browser to always download PDFs. I don't like to use the in-browser PDF reader.
It's fine to suggest that they should use a new window and view it in the browser (actually, I think this is the default in almost all browsers, but maybe not a new window), but don't try to force it if that's not what the user wants.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
davelf (04-03-2013)
Yup - Blackberry devices cant open PDF and there is currently no free app to download that allows that facility.
Focus on Function Web Design
Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps
iPads/iPhones can only view PDFs in a browser window. (So, yes, it varies a lot especially on mobile devices.)
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Since I got my iPhone, I've been reading them via DropBox. PDFs are a complete pain in the behind! LOL
Focus on Function Web Design
Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps
Ok, thanks for the advice everyone.
I'll just leave it, with default settings.
Bookmarks