Under the website https, the advertisements of Baidu and Alimama embed the analysis and solutions that are not displayed
1. After the website is upgraded to https, the advertisement embeddings of Baidu and Alimama are not displayed, as shown in Figure 1
2. Baidu’s advertisement embed code, where there is http URL
(function() {
var s = "_" + Math.random().toString(36).slice(2);
document.write('<div id="' + s + '"></div>');
(window.slotbydup=window.slotbydup || []).push({
id: '6758467',
container: s,
size: '200,280',
display: 'inlay-fix'
});
})();
</pre>
3. Alimama’s advertisement embed code, where there is http URL
document.write('<a style="display:none!important" id="tanx-a-mm_123311466_23836172_109841700208"></a>');
tanx_s = document.createElement("script");
tanx_s.type = "text/javascript";
tanx_s.charset = "gbk";
tanx_s.id = "tanx-s-mm_123311466_23836172_109841700208";
tanx_s.async = true;
tanx_s.src = "http://p.tanx.com/ex?i=mm_123311466_23836172_109841700208";
tanx_h = document.getElementsByTagName("head")[0];
if(tanx_h)tanx_h.insertBefore(tanx_s,tanx_h.firstChild);
4. Based on the browser prompt: After clicking loading an unsafe script, Baidu ads have been displayed, but Alimama is still displayed, and the browser prompt is not safe, as shown in Figure 2
5. Fortunately, both Baidu and Alimama have supported the https protocol, adjust the embedded advertising code, and replace https:// with https:// After opening the webpage again, it has been successfully displayed, and it is not prompted to be unsafe, as shown in Figure 3
<script type="text/javascript">
document.write('<a style="display:none!important" id="tanx-a-mm_123311466_23836172_109841700208"></a>');
tanx_s = document.createElement("script");
tanx_s.type = "text/javascript";
tanx_s.charset = "gbk";
tanx_s.id = "tanx-s-mm_123311466_23836172_109841700208";
tanx_s.async = true;
tanx_s.src = "https://p.tanx.com/ex?i=mm_123311466_23836172_109841700208";
tanx_h = document.getElementsByTagName("head")[0];
if(tanx_h)tanx_h.insertBefore(tanx_s,tanx_h.firstChild);


