Results 1 to 4 of 4

Thread: CSS Encrypt

  1. #1
    Join Date
    Mar 2010
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default CSS Encrypt

    Hi, is it possible to encrypt my CSS file, like html Encryptor? or is there a way to stop the file being downloaded and used?

    Thanks

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    See my response to your other post for why encryption is a bad idea in general.


    You can make it hard to read (for example, remove all line breaks), but I don't know of any way to actually "encrypt" it into something completely hidden.

    You could do something very strange with it then use Javascript to reapply the styles (so you have a completely invalid set of css styles that then are used by javascript and applied-- but realize how bad this would be to write and how awkward it would be, not to mention that it requires Javascript to work at all).


    This is now how the web is supposed to work.

    And, I promise, your code is not special enough (especially CSS!) that it needs to be hidden. Everything on the web is meant to be shared. Decide if you want to upload it, but don't pretend that you can actually hide it.


    Note also that for the second part of your question is it absolutely not possible to stop someone from downloading your CSS.
    Well-- it is-- just don't upload it in the first place.

    The way that the web works is that a user's computer sends a request to a server. The server then sends the data (CSS, HTML, Javascript, Images...) directly to the user. Once you view something, it is ON YOUR COMPUTER. It is then not possible to stop the user from "downloading" any part while allowing them to "view" it.
    Even if you find a way to encrypt things, there are very easy ways around this, such as in firefox using right click > view selection source and you can see the ACTIVE source code, not the original encrypted version.

    Anyone who's done web design for a while will tell you there's no point in this, but for most designers just starting it seems like a good idea. (But it's not.)

    And again, why do you think you need to hide your CSS? Do you have top secret colors or margins? I can understand Javascript or even HTML, but CSS is the least creative language out there: it's just a lot of properties and numbers... what is the point in hiding it? I'm sure someone else has already used the same setup as on your site-- there aren't that many possibilities.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    693
    Thanks
    1
    Thanked 113 Times in 111 Posts

    Default

    Quote Originally Posted by djr33 View Post
    ...why do you think you need to hide your CSS?..
    Congenital paranoia comes to mind.

  4. #4
    Join Date
    Mar 2010
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33 View Post
    Do you have top secret colors or margins? I can understand Javascript or even HTML, but CSS is the least creative language out there: it's just a lot of properties and numbers... what is the point in hiding it? I'm sure someone else has already used the same setup as on your site-- there aren't that many possibilities.
    Hi, thanks for your reply.

    It more for copyright issue's, I've designed something that I've not seen myself, ofcourse someone out there may be using it too.
    I've tried Google search's for simular design codes and nothing came up, well nothing that was the same or simular.

    It's no secret, just trying to keep it unique

    Once again thank you. Case Closed

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •