4 replies [Last post]
listerd
Offline
Regular
London
Last seen: 8 years 23 weeks ago
London
Timezone: GMT-5
Joined: 2007-02-08
Posts: 49
Points: 20

Hi

I am not sure but is it possible to stop people typing in mydomain.com/CSS and stealing all your CSS code?

I think that you can with something called .htaccess - is that applicable to CSS?

Thanks. L

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 7 years 46 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

No its not possible. Your

No its not possible. Your CSS needs to be freely available to allow it to be delivered to people using your site. It is possible to use obscurers to make it more difficult for people to work with your CSS. Also it is possible to restrict the sending of the CSS file based on the REFERRER value. The REFERRER value would need to come from a page on your website. This isn't a strong solution. The REFERRER value can be spoofed. Even without spoofing someone would just need to visit your site and then save the CSS file their browser retrieved for one of your pages.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 30 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Stealing Is it that

Stealing :?

Is it that good?

Generally it's not a consideration or worry, CSS has to be downloaded to the browser, CSS code is seldom unique but also tends not to be that copyable unless someone lifts all your html as well, and that is simply a risk you take.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

listerd
Offline
Regular
London
Last seen: 8 years 23 weeks ago
London
Timezone: GMT-5
Joined: 2007-02-08
Posts: 49
Points: 20

Your right Hugo, its a risk

Your right Hugo, its a risk you take. I just figured it would be nice to have one of those .htaccess files that blocke the CSS but it doesnt matter I guess. If anything in the /* text lines tell the potential thieft what you will do if you find yout code etc blah blah.

No worries.

T H A N K S anyways

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 3 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

I don't honestly think CSS

I don't honestly think CSS is copyrightable.
How can you prove you are the very first person to write the code the exact way you wrote it?

I don't think any self respecting lawyer would take that case.

all ยป http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph