-2

Is it possible to encode JavaScript and HTML code (such as the following) which is written in a .php file?

<script type="text/javascript" charset="UTF-8">
    function for_sale(){
        $.ajax({    
            type: "POST",
            url: "report/approve/check_status.php",
            data: '&stock_id='+format_stock_id,
            success: function(response) {
                ...
            }
        });     
    } 
</script>
8
  • Why would you want to encode the code? Commented Apr 24, 2014 at 8:05
  • 1
    What do you mean by "encode"? Commented Apr 24, 2014 at 8:05
  • when we press CRTL+u then we see all javascript code. I want to hide or encode the javascript code Commented Apr 24, 2014 at 8:07
  • I want to encode the code because everyone can see the url path written in ajax call and can easily track the URL of server and hence security will be lost Commented Apr 24, 2014 at 8:08
  • you could obfuscate it but not encode it Commented Apr 24, 2014 at 8:08

1 Answer 1

0

I think this has been asked before. Please refer to the link below

Encrypt HTML Source Code

Sign up to request clarification or add additional context in comments.

2 Comments

+1 for the link for greenhatman

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.