For cookie, image SRC uses IMG: data; base64

Source: Internet
Author: User

Today, I encountered a problem. When I write a cookie, I found that writing does not take effect. Later I found that I wrote cookies locally, but I didn't write them on the server, so I couldn't write them in any way.

Another problem is that when writing a cookie, the value of path must be noted.

Another interesting thing is that the image source address can be converted to base64 encoding, which can reduce the number of HTTP requests.

Refer:

Normally, the IMG tag is used in HTML to display images,

For example:

In fact, you can also use the base64 encoding format of the image to achieve the same effect,

For example,

Aaafcayaaacnbyblaaaheleqvqi12p4 // 8/w38giaxdibke0dhxgljnbaao

9txl0y4ohwaaaabjru5erkjggg = ">

Of course, you can also put some style images in the CSS file,

I personally think this is mainly to reduce the number of HTTP connections. It is suitable for background images on the page and is directly written in the CSS style. Moreover, the image itself is not very large and will not multiply the file CSS file size after base64 encoding.

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.