jQuery to download the file when clicking a link


  • Hi guys,

    My SharePoint environment is configured to open Office documents automatically in client applications and IE11 settings are such that the browser opens files without any prompts or warning messages. I do not want to change that.

    I have a requirement for just one library where, when users click links of the files, they would automatically be downloaded to their local disks (as if our sharepoint site was not in IE Trusted Sites).

    To complicate this further ;) I need this to happen for everybody, except one SharePoint group, who will have permissions to open server documents in their client apps (as in first paragraph of this post).

    Can I accomplish this with jQuery and if so, could anyone could help with the syntax?



    Monday, April 28, 2014 8:04 AM


  • I have resolved this issue myself by adapting and playing with some jquery and spservices snippets I found on the net. Please see my blog post for a complete scenario and a the solution:

    Tuesday, April 29, 2014 9:03 AM