This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to encrypt HTML, CSS and JavaScript to prevent theft
Please tell how to encrypt html page surce code for any webpage using javascript function if not possible then please tell alternative ways..
In order for the source to be rendered, it has to be decrypted in the browser and a DOM constructed, which which point the user can use a DOM inspector to access the DOM and serialize it back to HTML (thus creating a reasonable facsimile of the original HTML).
Thus there is no way, alternative or otherwise.
Related
This question already has answers here:
UTF-8 all the way through
(13 answers)
How to store other languages (unicode) in cookies and get it back again
(1 answer)
Closed 5 years ago.
I'm building a references generator and I need to keep track of the generated references. To achieve this, I'm currently using Javascript to store a cookie containing the raw data, then a PHP page embedded on the result page takes the cookie and logs it into an HTML page, however, some characters appears like this : �. I really don't know which way to go to solve this (base64 encoding, unicode encoded characters...)
Here's the link to the website : http://louisfelixberthiaume.000webhostapp.com/source_siteweb.php
[It's in french]
I can't give you the link to the HTML page for obvious confidentiality reasons, however I'll provide a screenshot :
Generated references screenshot
This question already has answers here:
How can I hide or encrypt JavaScript code? [duplicate]
(7 answers)
Closed 4 years ago.
I don't find any info about that,so asking here.
Is somebody ever used some tool to protect javascript files? And totaly encrypt them?
Because I found this tool that seems like can totaly encrypt JS?
What do you think?
http://webtools.securitygeeks.net/p/blog-page_26.html?
That tool is useless. It declares a global variable called teksasli which contains your original script in a plain string. just look at the value of that variable in any console to see the original source.
There is no point in trying to encrypt Javascript, because the user/browser needs to decrypt it in order to run it.
If you want to obfuscate the source code, You could try GWT http://mojo.codehaus.org/gwt-maven-plugin/ (The Google Web Toolkit ).
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Ways to circumvent the same-origin policy
Please help..
Mainly I want to parse a HTML from a different URL using JavaScript so I can find there if a class exists and I can show the result on my page if it exists or not.
I don't know your enviroment, but it looks like a jsonp :)
http://en.wikipedia.org/wiki/JSONP
1) You avoid same origin policy because You use src attribute of script tag.
2) You can have everything sent right into your callback function.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Persist javascript variables across pages?
how to exchange variables between two html pages
I am working on creating a "quiz" that allows users to answer questions, then passes their answer and current score to the next page for the next question. I used this article and was able to get the user's answer to pass through to the next window:
http://www.htmlgoodies.com/beyond/javascript/article.php/3471111/A-Quick-Tutorial-on-JavaScript-Variable-Passing.htm
The issue is that this passes the information through a form. Once I receive the score on the second page, I need to increment the score if the answer was correct. I can't figure out how to pass a javascript variable with an html form.
I feel like this should be a relatively easy fix, I'm just stumped.
Any thoughts or advice would be much appreciated!
xoxo
There are two obvious ways to maintain state in the browser without requiring that the server remember it between pages:
Cookies
localStorage
The latter is trivial to implement, but is only available in HTML5.
Note that neither is intended to be secure - a determined page hacker could set either to whatever value they wish.
You can submit a form using get method <form method="get" then use javascript to parse params in url. Reference here:
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How do I get the current location of an iframe?
Hi i want to get the complete URL, and with the methods i know i get the full url but of the iframe, and i want the 'final' document.location.href,
how can i get it?
i don't care if its php or js, but i'm guessing by my experiments that with PHp it's not possible...
If you want to know where you currently are:
Client side - javascript - you can use alert(window.location).
Server side - php - .$_SERVER["REQUEST_URI"] or $_SERVER['PATH_INFO'] depending on what you want.
Take a look at the top answer from this question.
It's important to note that it's (luckily!) not possible to get the URL of an iframe if the iframe's URL is from a different domain than the parent page. If you're trying to do that, you're probably out of luck.