Jquery tutorial (5) Security email list

Source: Internet
Author: User

Rules mention how to prevent spam: Do not put your email address in any mailto: link. Our web designers andProgramThe staff summed up some creative solutions, so that we can quickly look at the shortcomings of these common methods (more or less ).

Name [at-no-spam] website.com

Problem: the link type is more convenient, and an error may occur when you enter the email address in the recipient column.

Contact info

Problem: you are at this risk because a spam borrow your account to send a large amount of spam (unless you use a real security email script ). in this way, users who only want to send you a simple email are killed.

Java Script Encryption

Problem: your email is still exposed in the sky, even if you use a complex cryptographic technology to mask it. who else wants to enable a third-party decryption website to send an email? I will not.

Hiding behind a simple form(There is an example, but it cannot be opened.) http://simon.incutio.com/contact/anyone I can think... But let's see if we can improve our ideas.

Possible Solution: Ajax

The solution I provide has the following advantages over the methods currently used by designers:

    • Easy to implement
    • Easy to modify
    • There are also some little fancy Effects
    • Use third-party tools to encrypt email addresses
    • No email addresses are exposed in the sky

Finally, I would like to explain that I think it is unwise for an email to bypass spam through this encryption method. in practice, I think email encryption is relatively secure, but the objective fact is that email is still in the original htmlCode.

Concept

    1. 1. Use jquery to capture the HTML file content from the server.
    2. 2. Placing HTML files containing email links in a good container is a simple protection mechanism.

Example

I want to demonstrate some examples to show the email link address. When a visitor clicks a button or link, the page will jump to the corresponding example.

Click button -- display now

Link click-fade out

Page loading-fade out

Page loading-display now

(Note: the so-called instant display, I mean "show email addresses as soon as possible without fancy effects ")

Code

Here is a non-commercial co-creation license. If you want to use the code in your commercial product, contact me. I am using it in a new CMS for web designers.

Why is this method safer than normal mailto links?

The real problem is that spammers use automated software to search for email links from HTML source files. This approach is the same as Google's: use related links. he is just as lazy as most of us. so it's hard for them to take a book and place it next to the keyboard to write down your email address. for more information, seeSource codeYou will not find any email addresses in HTML. these solid guarantees that you will never receive spam, but will only receive emails from friends or viewers. but remove the email address from the page ,.....................

Last note

Take a closer look at the previous three examples. You will see that I used the Ajax callback function to trigger the slidedown () and show () effects. in other words, jquery starts slidedown () only when Ajax calls receive information (HTML. paste the secret to our simple service segment script and wait for the server to return information.

The correct method:

$ ( Document ) . Ready  ( Function ( )  { $. Post  (  'Mailtoinfo. php' , { Pass: "Secret"  } , Function ( Txt )  { $ (  'Div. Email'  ) . Html  ( Txt ) ; $ (  'Div. Email' ) . Slidedown  (  "Slow"  ) ; }  ) ; }  ) ;

Incorrect method:

$ ( Document ) . Ready  ( Function (  )  { $. Post  ( 'Mailtoinfo. php' , { Pass: "Secret"  } , Function ( Txt )  { $ (  'Div. Email'  ) . Html  ( Txt ) ; }  ) ; $ (  'Div. Email'  ) . Slidedown (  "Slow"  ) ; }  ) ;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.