javascript - PHP / JS Document viewer within browser -


i have many different document filetypes should downloadable users. these include presentations, pdf, excel etc etc. may mac filetypes too.

i'd possible if user can view document before downloading it.

i've hunted around found nothing except extension specific posts.

any appreciated

there 3 ways present content user:

  • content-disposition: attachment — tells browser should saved rather displayed
  • content-disposition: inline — tells browser should displayed (either natively or plugin) rather saved
  • via scripting / applets / flash / etc — in provide program code render content

the first 2 approaches generic http. third has handled on file-type file-type basis since need different renderers each kind of content.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -