Quote:
Originally Posted by VIPStephan
I can tell you why: Because they are sick of Google, Facebook, and what not spying on their browsing behavior (by using cookies, for example) and showing them allegedly “relevant” information.
|
I don't use Facebook, but cookies can be blocked without disabling Javascript.
I'll stick with my opinion that the tiny number of people who see fit to disable Javascript should accept the consequences of their deliberate decision. And why should I put in a lot of effort to meet the needs of 2% of users? Does not the Pareto principle apply here? I would rather put in that effort for the 98%. None of the websites I have ever created could be said to be "script ridden websites that are slow and bulky to use." I don't like pointless decorative features either, but if they are implemented they put off 98% of users with Javascript enabled and not the 2% without.
Here's an example of a Javascript technique I often use to protect an email address:-
Code:
<script type = "text/javascript">
var goodurl = "";
// obfuscate the url
var urlrev = "ku.oc.xxx"
urlrev = urlrev += ".etisym@ofni"
goodurl = urlrev.split("").reverse().join("");
goodurl = goodurl + "?subject=Enquiry re this website";
document.write('<a href=\"mailto:' + goodurl +'">');
document.write('Contact us by email' + '<\/a>');
</script>
<noscript>
<p class = "protected">Email address protected by JavaScript.<br>
Please enable JavaScript in your browser to contact us.
</p>
</noscript>
If the user is unwilling to do that, then he is not worth bothering with. The idea that every potential customer is worth having is wrong. I prefer to keep awkward so-and-sos away. By all means let them go to a competitor (if such exists).
And with respect, my personal opinion is just as good as yours.
Before felgall chimes in, document.write() is still a perfectly satisfactory way to write the original content of your page.