Can I use a custom logo for downloaded url files? - icons

My site has an option to download a shortcut (.url) file onto the user's PC by clicking a link. The idea is that users then can save this to their desktop, and use it a shortcut to the site for future visits. (I know it's wacky, but it's what my client wanted.)
I have an icon(.ico) file that I wish to use, but whenever the user downloads the file the icon is not shown.
I've tried opening the URL file in notepad and editing the IconFile value to point to the icon file on the server itself.
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=http://example.com/
IDList=
HotKey=0
IconFile=http://example.com/favicon.ico
IconIndex=0
However this does not seem to work. Can anyone suggest what might be wrong, or how I can fix it.

MS Windows does not load icon files specified with ´IconFile´ from the internet (for security reasons, I guess).
Rather it only loads the ´IconFile´ from
local file if the path is a file path, or
local web cache if the protocol is http:
You can verify this by navigating Internet Explorer to http://example.com/favicon.ico (now file is in cache) and then refreshing your *.url file (by right-clicking -> Edit -> [Make a fake change])
Now the icon should be displayed. Now clear your IE-cache, refresh *.url file, and the icon is gone (replaced by the icon of the default browser)
So,
either your client can tolerate that the default icon is displayed if icon is not cached, or
you have to provide a local copy.

Related

Microsoft IE open dialog Box and Microsoft Edge Open Dialog Box Different in behaviour

We have ASP.Net application - User clicks on a link and system show and an open dialog box with FROM (URL) as a label - User then clicks OPEN. Excel file open in EXCEL as READ-only- Excel File Path shows the URL path and this URL path then use to run VBA code.
In Microsoft Edge
This behavior change and OPEN action save the file in the local system in a GUID folder - Open in EXCEL as READ-WRITE mode and path show the local drive. Further actions will not run as the EXCEL file path is no longer belongs to the URL.
There are 10 Thousand EXCEL online files and many offline files. Hence we can't change application logic. Does anyone face the same issue and have any? solution/suggestion?
Please note that it works fine in IE Compatible mode but we want to run the app in NON-IE Compatible mode.

How to force Microsoft Edge to download file using correct file extension?

I don't know why, but clicking an anchor link to a .themepack file in Edge causes Edge to change the file extension to ".htm" instead, but only on my site. The .themepack files available on the Microsoft gallery do not behave this way.
Given this, I'm sure it must be a server configuration, but I can't determine how to fix it. At first it was trying to display the .themepack (it's a cab format file) as if it was text, right in the browser. I added the html5 attribute "download" to my <a> tag and that prompted for download, but it still tries to name it as .htm.
Demo of issue:
https://soulcon.com/downloads contains a link to https://soulcon.com/img/SOULCON.themepack
This either tries to show as text, or if you use the page to click the link containing the "download" attribute, it downloads as a .htm file.
Links at https://support.microsoft.com/en-us/help/13768/windows-desktop-themes do not cause this.
Considering this site is on managed wordpress by GoDaddy, I don't have any true direct access to the server.
You need to associate the .themepack file extension with the application/octet-stream MIME type on the server. Ask a support person at your hosting provider how to do that. It may be doable with an .htaccess file.
Worked round the issue by zipping the file.

How can I config workspace in chrome?

I'm trying to activate workspace tool for my local project. I want to apply CSS changes on my codes when I edit them into browser.
I've added my folder, perfix url and path of my project to the Chrome like this:
But still there isn't any change in my codes when I change it into browser, What's wrong?
Here are the steps to map a local workspace to a server path, using my example:
Click "Add folder" in the Workspace settings, and navigate to your working directory. Click "Allow" in the bar at the top to grant Chrome permissions.
Add a mapping between your server and the path
Load the URL and navigate to the Sources tab. Open your file and start editing.
If you save with Cmd+S (Mac) / Ctrl+S (Windows / Linux), the changes will be persisted in the workspace.
You can read more information from the official documentation here, which shows how to add it directly from the Sources panel. Read the Limitations section, in case you are trying to do something that isn't supported.

How to display a XDP pdf file in browser like how normal PDF file open?

I have a XDP file that Acrobat can open. It contains a PDF plus some data to fill in the form fields in the PDF.
In my HTTP request header I set
content-type to "application/vnd.adobe.xdp+xml" and
Content-Disposition to "in-line"
still my browser downloads the file and asks me if I want to Open it or save it. When I click on Open it loads the PDF form and data inside Acrobat, not in the web browser.
Do you have any idea?
UPDATE:
I reinstalled the Adobe plugin and now browser(FireFox) attempts to open the PDF but I get the following error:
that is very strange as the file is created by Acrobat it self. On the same page that throw this error, if I press OK and go to File > Save as.. and save the XDP file on desktop then drag and drop it into a new browser window, it opens it! and the address bar shows a very similar file name and location as was shown in the error (temp directory of FireFox cache).
It looks like an administration problem. Your file is being downloaded but Adobe doesn't have the access rights to that folder.
Contact your network administrator is my only answer.
I wonder if this open source project will solve your web display problem: pdf.js If not immediately, perhaps you can help it along.

browser Does not open 'Save file' dialog box

I have uploaded a file on server and given a link to that file (test.txt file say) in my asp.net page. when i click on this link, it opens the content of that text file within the browser. But i want to open a dialog box so that user can save it on his local machine.
More over if file is dll type then it gives 404 error(file not found).
I tried it out in IE and Firefox and also its working fine on my local IIS but not on Server machine.
There are various ways suggested of forcing a file download to the browser in ASP.Net, and lots of examples ("asp.net file download"). Here's one: http://aspalliance.com/259
Basically, what you'l need to do is transfer the file to the browser 'in code' using Response.WriteFile() or something similar.
You'll also need to set a couple of response headers so that the browser knows this is a download as opposed to a file it should try and load: Content-Type and Content-Disposition
Personally, I'd rather zip a DLL if it is to be downloaded - after all a DLL is executable code, and could be blocked at the client side.

Resources