Answer the question
In order to leave comments, you need to log in
How to protect html and css from copying?
Hello! There is the following problem - there is a static site (layout) and I need to somehow protect it from copying. More precisely - copying html css js. I've heard of course that it can't be done for sure. But I would be satisfied with any way to protect against the average copirons. I tried this .htaccess
<FilesMatch ".(htaccess|htpasswd|ini|phps|fla|psd|log|sh|html|css|js)$">
Order Allow,Deny
Deny from all
</FilesMatch>
<FilesMatch ~ "\.(php|htm|html|js)$">
Order allow,deny
Deny from all
</FilesMatch>
Answer the question
In order to leave comments, you need to log in
html css js - files that are downloaded to the client to display the page correctly.
Through .htaccess you restrict access to files, and, accordingly, if you specify these extensions, then you restrict access to the site to everyone (Deny from all).
Since this data is uploaded to the user (and should be uploaded), you have no way to restrict access to it completely.
The only option, against "stupid" users, is to intercept "shortcuts" (example - changing text when pressing Ctrl+C). Smart ones, in turn, will either open the developer tools, or simply use a site download utility (for example, wget).
Upd: Read about obfuscation: https://habrahabr.ru/company/xakep/blog/128741/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question