This question already has answers here:
How can I obfuscate (protect) JavaScript? [closed]
(22 answers)
Closed 4 years ago.
I'm installing Intercom (https://www.intercom.com) for customer engagement on my site. With the recommended installation the javascript snippet they gave would have my intercom app_id exposed in the page source.
May not be a big deal, but I was wondering if there was a better way where I could keep that hidden.
May not be a big deal
It isn't.
but I was wondering if there was a better way where I could keep that hidden
You can't.
Intercom need the browser to tell them your ID for their approach to work.
This means you must tell the browser your ID.
The browser is the property of the user and it answers to them.
It is not possible to give the browser information and keep it secret from the user who owns the browser.
Related
This question already has answers here:
How can I obfuscate (protect) JavaScript? [closed]
(22 answers)
how to hide javascript code [duplicate]
(4 answers)
Closed 7 years ago.
Is there anyway to hide or secure my javascript code. Because anyone can easily
see my javascript logic on my website using view page source and it's harmful for me. Please tell me any method you know for securing the javascript code or for making it difficult to understand using any encryption method with cannot easily decrypt.
You can't. Don't put sensitive code, keys, information, or logic on the client. The only thing you can do is make it harder to read by running your code through an obfuscator.
This question already has answers here:
How can I prevent javascript code theft?
(7 answers)
Closed 5 years ago.
I develop a small website now some of my friends asking to give us the code.so i want now to do a trick in my code that no one can copy or modify my code.if any one know's please post.
Copy: Forget it. If you give the code to someone, he can just copy and re-use it. Consider using an appropriate license for your code to make shure the receiver knows what he is allowed to do with your code
Changes: Use a version control system. As a developer you must learn to use at least one. Do it now. I recommend git, but there are plenty of VCS`ses available (svn,bazaar,cvs...)
This question already has answers here:
Create unique Poll/vote/survey in php
(3 answers)
how to identify remote machine uniquely in php?
(7 answers)
Closed 6 years ago.
We have a small web-poll system we use in a math class before semester begin on voluntary base. On one hand we dont want the students have to register or download something, because of possible lost of poll participants. On the orher hand there are some students who manipulate the poll by sending lot's of junk answers.
Is there a way to identify a user machine over http? Ideas how to create an simple identification?
Simple: it is not possible to get the users computer name with Javascript. You can get all details about the browser and network. But not more than that.
If you are looking for a simple solution just use a cookie with a far future expire marking the device as already voted. However, this is just a simple solution and does not protect you against users with minimal IT skills. You could consolidate the separation by saving a hashed value of their Browser version/os/ip with each vote and you can filter results when counting
This question already has answers here:
How can I obfuscate (protect) JavaScript? [closed]
(22 answers)
how to hide javascript code [duplicate]
(4 answers)
Closed 7 years ago.
Is there anyway to hide or secure my javascript code. Because anyone can easily
see my javascript logic on my website using view page source and it's harmful for me. Please tell me any method you know for securing the javascript code or for making it difficult to understand using any encryption method with cannot easily decrypt.
You can't. Don't put sensitive code, keys, information, or logic on the client. The only thing you can do is make it harder to read by running your code through an obfuscator.
This question already has answers here:
CSS: What does the question mark at the end of css do?
(7 answers)
What does "styles.css?=121" mean in this html code? [duplicate]
(2 answers)
Closed 8 years ago.
Why do use like this filename.css?2 or filename.js?4
What are those numbers after question mark?
I did research online but I didn't find any answer.
Thanks!
These are called cache busters.
Usually, when a browser downloads a file (CSS, JS, etc.) it caches it so that it doesn't have to download it later.
However, this is a problem when you decide to update your file, because the browser thinks it already has the latest version. To work around it, we use the cache busters. When you make a change to the file, you also change the number after the question marks, which tricks the browser into thinking this is a different file for which it doesn't have a cache it, and forces a re-download.
Sometimes JS scripts are created on the fly using server side technologies other times it is simply a version number to help with browser caching issues