hidden style sheet

Discussion in 'HTML' started by baldo, Jun 9, 2013.

  1. baldo

    baldo Guest

    Is it possible to hide a style sheet for all browsers?
    baldo, Jun 9, 2013
    #1
    1. Advertising

  2. baldo

    dorayme Guest

    In article <XnsA1DA514376E49notnovalidno@91.208.207.40>,
    baldo <> wrote:

    > Is it possible to hide a style sheet for all browsers?


    You cannot actually hide other people's stylesheets whether they be
    the default one the browser uses or one made and used by the browser
    user (called a user stylesheet) but you can supply your own so as to
    take your best shot to override what you expect would happen without
    your intervention.

    For example, to take just one case, the BODY element almost invariably
    gets a margin, but you can, and it is actually quite common for
    authors to, set it to 0.

    (I believe Broweroginsts once tried to sneak html {display: none;}
    into other people's websites but they failed. They contented
    themselves with adding this to their own websites so that no one would
    normally see anything at all. Unfortunately browser makers gave users
    simple menu items to disable author stylesheets and everyone was able
    to see their sites. They were rounded up and hanged I believe).

    --
    dorayme
    dorayme, Jun 9, 2013
    #2
    1. Advertising

  3. 2013-06-09 8:59, baldo wrote:

    > Is it possible to hide a style sheet for all browsers?


    Certainly. For example, write the style sheet only on a sheet of paper
    and never show that paper to any browser. Well, better burn the paper to
    be sure!

    If you wanted to ask how to include a style sheet on your web page and
    not include it there, then even God cannot do that. This is not a
    limitation of God's power; it follows from the fact that a logically
    self-contradictory description of a state of affairs does not describe
    any state of affairs.

    So how about telling us what you would really want to achieve?

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Jun 9, 2013
    #3
  4. baldo

    dorayme Guest

    In article <>,
    dorayme <> wrote:

    > Broweroginsts


    That should read "Browseroginists".

    --
    dorayme
    dorayme, Jun 9, 2013
    #4
  5. baldo

    baldo Guest

    "Jukka K. Korpela" <> wrote in news:kp1gbp$2tv$1@dont-
    email.me:

    >
    > So how about telling us what you would really want to achieve?
    >


    I like to hide my extern linked style sheet to protect some codes...
    baldo, Jun 9, 2013
    #5
  6. 2013-06-09 14:38, baldo wrote:

    > I like to hide my extern linked style sheet to protect some codes...


    So this is a variant of "how do I hide my web page code". The answer is
    twofold. First, you cannot. Anything that a browser can read can be read
    by a human being, too, and it's not even difficult to anyone who would
    know what to do with the code. Second, if you want to protect your code
    from being "stolen", the odds are that even a drunken monkey wouldn't
    dream of "stealing" it.

    It is true that some authors are more stupid than drunken monkeys, but
    then it's really their problem if they "steal" your code. You can damage
    them a bit more by including misleading or plain wrong comments into
    your CSS code. (You won't need to try hard. Usually when people write
    any comments in CSS code, they are misleading or wrong, or become
    misleading or wrong when the code is edited and the comments will be
    retained as such.)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Jun 9, 2013
    #6
  7. baldo

    Luuk Guest

    On 09-06-2013 11:07, Jukka K. Korpela wrote:
    > If you wanted to ask how to include a style sheet on your web page and
    > not include it there, then even God cannot do that. This is not a
    > limitation of God's power; it follows from the fact that a logically
    > self-contradictory description of a state of affairs does not describe
    > any state of affairs.


    A real believer will claim its not logical to claim this as a limitation
    of Gods' power.

    Because you should know that there is NO limit to God's power, and
    therefore He can do so, even if it follows from the fact that a
    logically self-contradictory description of a state of affairs does not
    describe any state of affairs.
    Luuk, Jun 9, 2013
    #7
  8. baldo

    j Guest

    On 6/9/2013 1:59 AM, baldo wrote:
    > Is it possible to hide a style sheet for all browsers?


    It's much easier to make them undecipherable, in fact most come that way.

    It is sort of possible to make a server generated stylesheet (with the
    correct Content-type) that would be hard to access as a link, but the
    stylesheet contents would still be visible in any of the web developer
    tools that the browser might have.

    Otherwise, I agree completely with Jukka.

    Jeff

    >
    j, Jun 11, 2013
    #8
  9. baldo

    Gordon Levi Guest

    baldo <> wrote:

    >Is it possible to hide a style sheet for all browsers?


    The usual response to this and to hiding the source of a web page is
    that it can't be done. That may be true but I think you could
    obfuscate it
    <http://en.wikipedia.org/wiki/Obfuscation_%28software%29>. That would
    protect your source from all but the most determined snoopers unless
    they could use it unaltered.
    Gordon Levi, Jun 12, 2013
    #9
  10. Gordon Levi wrote:
    > baldo <> wrote:
    >
    >> Is it possible to hide a style sheet for all browsers?

    >
    > The usual response to this and to hiding the source of a web page is
    > that it can't be done. That may be true but I think you could
    > obfuscate it
    > <http://en.wikipedia.org/wiki/Obfuscation_%28software%29>. That would
    > protect your source from all but the most determined snoopers unless
    > they could use it unaltered.
    >


    First Law of Web Development:

    The intrinsic value of code is inversely proportional to the effort to
    hide it.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jun 12, 2013
    #10
  11. baldo

    Gus Richter Guest

    On 6/9/2013 1:59 AM, baldo wrote:
    > Is it possible to hide a style sheet for all browsers?



    You mean something like this?

    <http://tinyurl.com/kep3z79>

    --
    Gus
    Gus Richter, Jun 14, 2013
    #11
  12. Gus Richter wrote:
    > On 6/9/2013 1:59 AM, baldo wrote:
    >> Is it possible to hide a style sheet for all browsers?

    >
    >
    > You mean something like this?
    >
    > <http://tinyurl.com/kep3z79>
    >


    Obfuscated, but not hidden:

    /* Hidden in plain sight */
    article {
    margin:auto;
    font-size:100%;
    width:50%;
    background-color:#FFFF99;
    color: red;
    margin-top:10em;
    padding: 0 .5em;
    border:1px dashed #f00;
    }

    p {
    text-align:center;
    font-size:110%;
    }
    em {
    color:blue;
    }
    #interrobang
    {
    Font-size:200%;
    }



    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jun 14, 2013
    #12
  13. baldo

    Gus Richter Guest

    On 6/14/2013 12:14 AM, Jonathan N. Little wrote:
    > Gus Richter wrote:
    >> On 6/9/2013 1:59 AM, baldo wrote:
    >>> Is it possible to hide a style sheet for all browsers?

    >>
    >>
    >> You mean something like this?
    >>
    >> <http://tinyurl.com/kep3z79>
    >>

    > Obfuscated, but not hidden:


    Many years ago this same question arose in Blooberry's chat which is no
    longer there. In fact the Blooberry site itself is no longer maintained.
    In any case, I submitted a similar page as a lark back then. It turned
    out, to my surprise, that everyone was very confused and asked how I did
    it (without the many tools available today, there was only Notepad back
    then).

    I now submitted this in the same spirit. I wonder if anyone nowadays
    finds this initially surprising and confusing.

    --
    Gus
    Gus Richter, Jun 14, 2013
    #13
  14. Gus Richter wrote:
    > On 6/14/2013 12:14 AM, Jonathan N. Little wrote:
    >> Gus Richter wrote:
    >>> On 6/9/2013 1:59 AM, baldo wrote:
    >>>> Is it possible to hide a style sheet for all browsers?
    >>>
    >>>
    >>> You mean something like this?
    >>>
    >>> <http://tinyurl.com/kep3z79>
    >>>

    >> Obfuscated, but not hidden:

    >
    > Many years ago this same question arose in Blooberry's chat which is no
    > longer there. In fact the Blooberry site itself is no longer maintained.
    > In any case, I submitted a similar page as a lark back then. It turned
    > out, to my surprise, that everyone was very confused and asked how I did
    > it (without the many tools available today, there was only Notepad back
    > then).
    >
    > I now submitted this in the same spirit. I wonder if anyone nowadays
    > finds this initially surprising and confusing.
    >


    No special tools required. View source has always been there that I
    recall since the first Netscape Navigator...I don't know about Mosaic, I
    never used it.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jun 14, 2013
    #14
  15. baldo

    Gus Richter Guest

    On 6/14/2013 5:53 PM, Jonathan N. Little wrote:
    > Gus Richter wrote:
    >> On 6/14/2013 12:14 AM, Jonathan N. Little wrote:
    >>> Gus Richter wrote:
    >>>> On 6/9/2013 1:59 AM, baldo wrote:
    >>>>> Is it possible to hide a style sheet for all browsers?
    >>>>
    >>>>
    >>>> You mean something like this?
    >>>>
    >>>> <http://tinyurl.com/kep3z79>
    >>>>
    >>> Obfuscated, but not hidden:

    >>
    >> Many years ago this same question arose in Blooberry's chat which is no
    >> longer there. In fact the Blooberry site itself is no longer maintained.
    >> In any case, I submitted a similar page as a lark back then. It turned
    >> out, to my surprise, that everyone was very confused and asked how I did
    >> it (without the many tools available today, there was only Notepad back
    >> then).
    >>
    >> I now submitted this in the same spirit. I wonder if anyone nowadays
    >> finds this initially surprising and confusing.
    >>

    >
    > No special tools required. View source has always been there that I
    > recall since the first Netscape Navigator...I don't know about Mosaic, I
    > never used it.


    Right on. The straightforward way. But you see, many/most people
    will/did not think of the scrolling part.

    I was thinking more in terms of today's developer tools (e.g. Firebug)
    which is overkill in this instance.

    --
    Gus
    Gus Richter, Jun 15, 2013
    #15
  16. baldo

    dorayme Guest

    In article <kpe51f$dbe$>,
    "Jonathan N. Little" <> wrote:

    > Gus Richter wrote:
    > > On 6/9/2013 1:59 AM, baldo wrote:
    > >> Is it possible to hide a style sheet for all browsers?

    > >
    > >
    > > You mean something like this?
    > >
    > > <http://tinyurl.com/kep3z79>
    > >

    >
    > Obfuscated, but not hidden:
    >
    > /* Hidden in plain sight */
    > article {
    > margin:auto;
    > font-size:100%;
    > width:50%;
    > background-color:#FFFF99;
    > color: red;
    > margin-top:10em;
    > padding: 0 .5em;
    > border:1px dashed #f00;
    > }
    >
    > p {
    > text-align:center;
    > font-size:110%;
    > }
    > em {
    > color:blue;
    > }
    > #interrobang
    > {
    > Font-size:200%;
    > }


    It's actually more complicated due to browser differences. On my
    Safari, both yours and Richter's just shows up in View source. In
    Firefox, Richter's does not but yours does.

    --
    dorayme
    dorayme, Jun 15, 2013
    #16
  17. dorayme wrote:
    > In article <kpe51f$dbe$>,
    > "Jonathan N. Little" <> wrote:
    >
    >> Gus Richter wrote:
    >>> On 6/9/2013 1:59 AM, baldo wrote:
    >>>> Is it possible to hide a style sheet for all browsers?
    >>>
    >>>
    >>> You mean something like this?
    >>>
    >>> <http://tinyurl.com/kep3z79>
    >>>

    >>
    >> Obfuscated, but not hidden:
    >>
    >> /* Hidden in plain sight */
    >> article {
    >> margin:auto;
    >> font-size:100%;
    >> width:50%;
    >> background-color:#FFFF99;
    >> color: red;
    >> margin-top:10em;
    >> padding: 0 .5em;
    >> border:1px dashed #f00;
    >> }
    >>
    >> p {
    >> text-align:center;
    >> font-size:110%;
    >> }
    >> em {
    >> color:blue;
    >> }
    >> #interrobang
    >> {
    >> Font-size:200%;
    >> }

    >
    > It's actually more complicated due to browser differences. On my
    > Safari, both yours and Richter's just shows up in View source. In
    > Firefox, Richter's does not but yours does.
    >


    No, it all there in all browser, you have to scroll because he put
    leading whitespace....it's like the folks that try to hide source with
    50 or so leading carriage returns.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jun 15, 2013
    #17
  18. baldo

    Gus Richter Guest

    On 6/14/2013 10:54 PM, Beauregard T. Shagnasty wrote:
    > Jonathan N. Little wrote:
    >
    >> No, it all there in all browser, you have to scroll because he put
    >> leading whitespace....it's like the folks that try to hide source with
    >> 50 or so leading carriage returns.

    >
    > There appears to be about 250 leading spaces in Gus's lines. When I view
    > source in his page with Firefox, the CSS wraps, so there is no hiding at
    > all. I didn't even notice the excess spacing the first time I looked, as
    > the CSS was right there in front of me...


    Yup, browsers act differently I see. It didn't used to a bunch of years
    ago. For some of them it seems to depend on the View Source Width. For
    me Firefox renders as it did in the old days; nicely tucked off to the
    right accessible by scrolling. In any case, this was not meant as a
    serious thing, only in fun.

    --
    Gus
    Gus Richter, Jun 15, 2013
    #18
  19. baldo

    dorayme Guest

    In article <kpgjq0$lk4$>,
    "Jonathan N. Little" <> wrote:

    > dorayme wrote:
    > > In article <kpe51f$dbe$>,
    > > "Jonathan N. Little" <> wrote:

    ....
    > > It's actually more complicated due to browser differences. On my
    > > Safari, both yours and Richter's just shows up in View source. In
    > > Firefox, Richter's does not but yours does.
    > >

    >
    > No,


    Yes, OK, but in my Safari, *no horiz scrolling is needed*, the browser
    sees through it and brings it all to the left and it is visible from
    the get go.

    --
    dorayme
    dorayme, Jun 15, 2013
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marc Nederhoff

    Adding style sheet dynamicaly

    Marc Nederhoff, Nov 5, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    411
    charles
    Nov 5, 2003
  2. Replies:
    0
    Views:
    505
  3. Rick
    Replies:
    3
    Views:
    8,089
    Alexey Smirnov
    Apr 13, 2010
  4. Ken Varn
    Replies:
    0
    Views:
    424
    Ken Varn
    Apr 26, 2004
  5. SolarCanine
    Replies:
    2
    Views:
    250
    SolarCanine
    Sep 20, 2005
Loading...

Share This Page