Question Locked

is there a way to disable downloading certain file types in a browser ?

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello everyone

is there a way to disable downloading certain file types in a browser ? or even all files ?

9 replies

by kees_b edited

First of all, that depends on the browser. If you make your own one, using the open source chromium from https://github.com/chromium/chromium it can be yes, depending on what you program.

If it's not in the settings of the browser you use, the answer, alas, is no.

I checked Firefox. It allows you to specifiy a program to open the downloaded file with a certain extension. If you use a program that opens the file and deletes it, it's only on your PC for a very short time. But few users would set their setting to delete a file they download, so it seems a quite useless setting. There is no way to specify it in the Windows registry or in a policy, so that you as a system manager can set it, and the ordinary user can't undo it. That's for the simple reason that commercial browsers are made to run in other OS'es than Windows.

Feel free to ask Microsoft to add the option to Edge in such a way that it can't be overwritten by non-administrator users in your company network. But sorry if using Chrome is the company standard.

by safnah

thank you so much for that informative answer but i guess there's still no way to accomplish this important task specially with so many ransomware spread over the internet.

by birdmantd

My advice to avoid ransomware is to only download from trusted internet sites/sources and not to randomly click on links that you see on the page but don't know/trust. A little due diligence goes a long way. Sometimes you cannot rely on someone or something else to do it for you.

by Harisamer214 edited

1. Google Chrome: Open Chrome and go to Settings > Advanced > Downloads. Under Download restrictions, select the file types that you want to block.

2. Mozilla Firefox: Open Firefox and go to Menu > Options > General > Downloads. Under Allowed and blocked file types, select the file types that you want to block.

3. Microsoft Edge: Open Edge and go to Settings > Cookies and site permissions > Downloads. Under Allowed and blocked file types, select the file types that you want to block.

4. Safari: Open Safari and go to Preferences > General > Downloads. Under File types to download, uncheck the file types that you want to block.

by kanewilliam325 edited

Great information. Really very helpful.

Thank you for sharing it.

by LouisDay edited

One common approach is configuring the web server's .htaccess file for Apache servers. You can use directives like FilesMatch or mod_rewrite to block specific file extensions or types.

This will prompt the browser to treat PDF files as attachments, triggering a download prompt rather than displaying them in the browser. Be cautious when modifying server configurations and always test thoroughly to ensure the desired behavior without unintended consequences.

Additionally, if you're using a different web server, there are similar approaches to achieve this kind of restriction.

For example, to block downloading PDF files, you can use:

<FilesMatch "\.(pdf)$">
Header set Content-Disposition "attachment"
</FilesMatch>

by cassharper030 edited

most browsers allow you to set it so you're prompted to choose a location to save every download. This way, you can decide whether or not to download a file based on the extension (like .exe or .zip).

For completely blocking all downloads, that's trickier and depends on your browser and system. It might involve browser extensions or system-level security settings.

by cassharper030

Yes, there are ways to limit downloads in most browsers!

Block specific file types:
1. Google Chrome: Open Chrome settings > Advanced > Downloads. Under "Downloads," you can choose to block specific file extensions like ".exe" or ".zip".

Block all downloads:
This option is generally not recommended as it can be inconvenient. However, some browsers allow it:
1. Chrome: There's no built-in option, but extensions can achieve this (use with caution).
2. Firefox: Limited functionality. You can set Firefox to always ask where to save files before downloading, making it a manual process.

This discussion is closed to new replies.