SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question using php to hide most of the html css and javascript code.

    hi, i had seen a post on site point about how to hide your html css and java script code using php. cant find it. any help on this subject would be appreciated.
    just to clarify i understand browser needs to know html etc code and it is client side tech. though i understand it can be put in a file on server which php can serve to the browser. now if this is possible how it can be done ? and does that mean seo suicide?
    if an admin can direct me to the article/tuts which i am rather sure i read on site point that would be great too.
    thank you in advance.

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2011
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no way to hide the HTML nor Javascript from the user. You can make the source code hard to read, but you can't hide it.

    Not sure why you would even want to do this...

  3. #3
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    because i think i read it that it is possible. i see this question everywhere 'why do you wanna hide it?'. the question is how to if it is. like maybe a part of it and not whole of it. now why i might wanna do this is really not for any nasty reason. its more an academic and practical question. i dont code smart enough to be of trouble to anyone. and i wont if knew how or atleast thats how i am in my techno spiritual sensibilities

  4. #4
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,508
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    It can't be done. The HTML, CSS and Javascript code has to be sent to the client (the browser usually). Once it's there, there's no way you can prevent anyone from seeing it.

  5. #5
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    There is a way to hide your HTML, your CSS and your super-Javascript. Don't send it to the browser, print in out onto paper, lock it into a safe, then use-military-grade physical HDD devourers to rid the code from your HDD.






    (Find the serious part.)
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  6. #6
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guido2004 View Post
    It can't be done. The HTML, CSS and Javascript code has to be sent to the client (the browser usually). Once it's there, there's no way you can prevent anyone from seeing it.
    cool thanx

  7. #7
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    There is a way to hide your HTML, your CSS and your super-Javascript. Don't send it to the browser, print in out onto paper, lock it into a safe, then use-military-grade physical HDD devourers to rid the code from your HDD.






    (Find the serious part.)
    hmm thanx . sounds like a plan. and that reminds me i need some super-Javascript. let me see if i get through that part without getting kidnapped or assassinated for thinking! then will check back for military grade HDD.


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
  •