chrispey Posted July 27, 2009 Share Posted July 27, 2009 Hi there,I'm looking to link to an html file which is more than easy enough but upon clicking on it I'd like the file to be opened in Notepad (or Notepad++ preferably). Is there a way in code to bypass the default program for a filetype?Thanks! Link to comment Share on other sites More sharing options...
Synook Posted July 28, 2009 Share Posted July 28, 2009 You can specify the content-type application/octet-stream, that will force a download, but it is then up to the user as to what they open it in. Link to comment Share on other sites More sharing options...
uwspstar Posted July 28, 2009 Share Posted July 28, 2009 Hi there,I'm looking to link to an html file which is more than easy enough but upon clicking on it I'd like the file to be opened in Notepad (or Notepad++ preferably). Is there a way in code to bypass the default program for a filetype?Thanks!u can set up the default program to open the file , right ? Link to comment Share on other sites More sharing options...
chrispey Posted July 28, 2009 Author Share Posted July 28, 2009 u can set up the default program to open the file , right ?Absolutely. The only thing is I want ".html" docs to open by default in browser. What I'm looking to do is link to a .html doc that would open in Notepad or another such program. Not sure if it's even possible Link to comment Share on other sites More sharing options...
Ingolme Posted July 28, 2009 Share Posted July 28, 2009 You can have a folder on your server that has the Content-Disposition header set, which would force the file to download. However, once on the client's computer they have to choose what to do with the file.EDIT: Actually, it's basically the same thing as trying Synook's suggestion. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.