Js prevent people downloading my website files






















I tried blank index. I also tried using "deny from all". The best you can do is obfuscate the sources. You could minify the script files, or even have them dynamically generated and fetched in small pieces by another JS file. However, anything you do can be reverse-engineered, because the users must be able to access the rules in order for the browser to use them.

If you mean you don't want to show the directory listing for your css and js directories, add the following to your. First of all, preventing direct link to the css file doesn't mean that other people can't see the content.

Most browsers have features to inspect the files loaded, which includes your css. I can't think of a reason why you want to do this though. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 9 years, 10 months ago. Active 9 years, 4 months ago. My personal suggestion to add a layer of protection is to display images using the background style and overlay them with a transparent 1x1px Put the actual images size within width and height You don't have to disable right-click and most people trying to steal your picture won't notice they got an empty transparent pixel until they go about viewing those files.

We used to have that? Disabling right-click is one very good way to seriously piss off your users. I know it is a private photo but.. When he used the words "page" and "they", I thought that thelink refers to a fanpage and not a fb profile You can post it as new question. Restricting your visitors from saving images is may be not a good idea.

It can annoy them, either share it, or don't. Disable right click, but they still can save it re enabling right click set your images to load directly from server, but they can get it from cache Set the images to be downloaded in parts, so they cant get it from cache Disable the clipboard. This service does all this things if you dont want to do it by yourself, and it is not free. Reymaz, Jeff has the right idea. You can put the images in another folder and protect it with a password or your HTacess file, however if the images are displayed, the browser has to download them.

Share Share Tweet Email. Related Topics Answers. MakeUseOf Articles Published. Subscribe to our newsletter Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals! Click here to subscribe. Those who want to post content on the web, and control its distribution, are looking to have their cake and eat it too. If you are using PHP, the best way is to control it the. You can also have a look at my question and the accepted answer here for more tricks on the browser side.

In short, no. If someone can view an image or video in their browser then they have, by definition, downloaded it. That's how the web works - it is client server based. Whatever you can view in your browser client has been transfered to your computer from the remote website server. You didn't really say, but I'm guessing you are having problems with people deep linking into your content. If that's the case, and you are open to server side code, I believe this might work:. But it's a general outline of a workable process which might help you prevent users from deep linking.

You can overlay images with a transparent div , which will prevent people from right clicking on them or, setting the background of a div to the image will have the same effect.

If you're worried about cross-linking ie, other people linking to your images, you can check the HTTP referrer and redirect requests which come from a domain which isn't yours to "something else".

It also doesn't hurt to watermark your images with Photoshop or even in Lightroom 3 now. Make sure the watermark is clear and in a conspicuous place on your image. That way if it's downloaded, at least you get the advertising!

No it's not. You may block right-clicks and simillar stuff but if someone wants to download it, he will do so, trust me ;. As soon as they view your page that includes the picture or video, the item is downloaded into the temporary folder of their browser.

So if you don't want it downloaded, don't post it. You can mark folders or files so that they don't have read access any of the main web servers support this. This allows you to store them on the server without any level of access to the outside world. You may want to do this if you have a service that generates images for someone else to download later, or if you use your web account for FTP access, but don't want anyone to view the files.

However, as others have said, getting into copyright areas where people can view the image or video but not save them locally is not fully possibly, although there are tools to discourage illegal usage. Plus, it will provide a better streaming experience for your users without the need for a separate streaming server. Granted that any image the user can see will be able to be saved on the computer and there is nothing you can do about it.

Now if you want to block access to other images that the user is not supposed to see, I am actually doing it that way:. Div overlaping or background pic setting but users with little sense can easily save all resources by opening inspect element or other developer option.

This will remove any click functionality from a page, but it sure stops people stealing any content! If you want only authorised users to get the content, both the client and the server need to use encryption.

For video and audio, a good solution is Azure Media Services, which has content protection and encryption. You embed the Azure media player in your browser and it streams the video from Azure. For documents and email, you can look at Azure Rights Management, which uses a special client. It doesn't currently work in ordinary web browsers, unfortunately, except for one-off, single-use codes.

I'm not sure exactly how secure all this is, however. As others have pointed out, from a security point of view, once those downloaded bytes are in the "attacker's" RAM, they're as good as gone. I think the best way is to prevent right clicking on your webpage, because that is the most convenient way a normal user try to download the content, and you can consider it as remark if u able to do this only as you are never gonna be able to stop a computer geek or hacker people from downloading it, because once the content is on the internet, it means it is in the public domain already Put the content on google drive and make it download protect.

This way people can only see your documents, pictures but cannot download it. I believe THEOplayer already provides this sort of solution as a paid service, but I'm not so sure about it.

There are video hosting services such as vzaar that have this functionality. As far as I know, that will make it really hard to download directly. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 12 years, 3 months ago. Active 2 months ago. Viewed k times. Improve this question.

Haim Evgi Haim Evgi k 44 44 gold badges silver badges bronze badges. Do you mean require a login to access them? Or do you mean prevent them from being saved out of the browser?



0コメント

  • 1000 / 1000