473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Any one know how Google Docs is able to force MS office files to not open in browser?

392 Expert 256MB
Ok, I am looking for way to have a user download a file, and have it open the apprpreate client side application.

For instance lets say a user is downloading an MS Word file. I want the user to get the dia log box asking them if they want to open, or save the file. If they click open I want the file to open in MS Word, but outside of the browser instead of inside the current frame.

I am aware of the options for playing with the MIME types and or setting the content-disposition","attachment; filename=file" header values. These do bring up the dialog box, but when a user in IE clicks open MS Word opens inside of IE.

I was assuming there was no way to do this but I noticed that Google Docs is some how able to enforce this. I checked in a header viewer and changed my applicaiton to set the same values but, still no luck. Any one know how Google pulls this off?


Header returned when downloading MS Office files from Google Docs.
HTTP/1.x 200 OK
Content-Type: application/msword; charset=UTF-8
content-disposition: attachment; filename="chap8.doc"
Content-Length: 71680
Cache-Control: private
Date: Fri, 30 Nov 2007 18:39:16 GMT
Server: GFE/1.3
Nov 30 '07 #1
1 1579
acoder
16,027 Expert Mod 8TB
I'm not sure how they manage to force the file to open outside the browser, but I don't think there's anything in JavaScript that can force it.
Dec 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Neil | last post by:
An article at http://news.com.com/2100-1012-991694.html?tag=fd_top states: "XML would allow easier interchange of data generated in Office documents with back-end systems or existing Web...
2
by: Miguel Dias Moura | last post by:
Hello, in my web site i display some links to PDF files. This links are loaded from a database. Anyway, when i click these links the PDF files are open in the visitors browser and in Acrobat. ...
13
by: ron1972 | last post by:
Hi I have a large pdf file that if I create an anchor link to, the browser will try to open the file, which takes quite a long time. Is there a way to force the browser to download the file rather...
4
by: vincemoon | last post by:
I can see from http://72.14.203.104/search?q=cache:6f-yXCR3f8kJ:www.readol.net/books/computer/WEb/XML%2520Programming/xmlproghtml/32ch08b.htm+%22metadata+about+any+entity%22&hl=en&gl=us&ct=clnk&cd=3...
5
by: MoshiachNow | last post by:
HI, How do I force a browser to open a certain file with notepad ? <LI><A HREF="D:/Program Files/yohoLogFile.txt.4" ><p style="font-family:font-size: 7pt;"yohoLogFile.txt.4 </A></LI>'; ...
5
by: Jim Bancroft | last post by:
Hi everyone, We've have files we'd like to store in a SQL Server blob or text column and make available online for our clients. Instead of linking to a document sitting on a file server, we...
1
by: ABC | last post by:
Hi, I found many methods to download attachment files, but I cannot found any to force the browser open excel file if the download is excel type. Is there any reference or tutorial on internet?
3
by: Chuck | last post by:
I've been having problems with Access and Excel talking to one another. In the process of trying to add features (programs) to Access 97 I have lost the ability to export an Access query to an...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.