Chrome 110, scheduled to roll out on February 7, 2023, accommodates a change to the way it handles the Internet Share API that improves privateness and safety by requiring a the Internet Share API to explicitly permit third-party content material.
This won’t be one thing that a person writer must act on.
It’s in all probability extra related on the developer facet the place they’re making issues like net apps that use the Internet Share API.
Nonetheless, it’s good to know what it’s for the uncommon scenario when it could be helpful for diagnosing why a webpage doesn’t work.
The Mozilla developer web page describes the Internet Share API:
“The Internet Share API permits a web site to share textual content, hyperlinks, information, and different content material to user-selected share targets, using the sharing mechanisms of the underlying working system.
These share targets usually embrace the system clipboard, e mail, contacts or messaging purposes, and Bluetooth or Wi-Fi channels.
…Be aware: This API shouldn’t be confused with the Internet Share Goal API, which permits a web site to specify itself as a share goal”
permit=”web-share” Attribute
An attribute is an HTML markup that modifies an HTML component ultimately.
For instance, the nofollow attribute modifies the <a> anchor component, by signaling the various search engines that the hyperlink is just not trusted.
The <iframe> is an HTML component and it may be modified with the permit=”web-share” attribute
An <iframe> permits a webpage to embed HTML, often from one other web site.
Iframes are in every single place, similar to in ads and embedded movies.
The issue with an iframe that accommodates content material from one other web site is that it creates the potential for exhibiting undesirable content material or permit malicious actions.
And that’s the issue that the permit=”web-share” attribute solves by setting a permission coverage for the iframe.
This particular permission coverage (permit=”web-share”) tells the browser that it’s okay to show third social gathering content material from inside an iframe.
Google’s announcement makes use of this instance of the attribute in use:
<iframe permit="web-share" src="https://third-party.instance.com/iframe.html"></iframe>
Google calls this a “a probably breaking change within the Internet Share API.”
The announcement warns:
“If a sharing motion must occur in a third-party iframe, a latest spec change requires you to explicitly permit the operation.
Do that by including an permit attribute to the <iframe> tag with a price of web-share.
This tells the browser that the embedding web site permits the embedded third-party iframe to set off the share motion.”
Learn the announcement at Google’s Chrome webpage:
New necessities for the Internet Share API in third-party iframes
Featured picture by Shutterstock/Krakenimages.com
var s_trigger_pixel_load = false; function s_trigger_pixel(){ if( !s_trigger_pixel_load ){ striggerEvent( 'load2' ); console.log('s_trigger_pix'); } s_trigger_pixel_load = true; } window.addEventListener( 'cmpready', s_trigger_pixel, false);
window.addEventListener( 'load2', function() {
if( sopp != 'yes' && !ss_u ){
!function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window,document,'script', 'https://connect.facebook.net/en_US/fbevents.js');
if( typeof sopp !== "undefined" && sopp === 'yes' ){ fbq('dataProcessingOptions', ['LDU'], 1, 1000); }else{ fbq('dataProcessingOptions', []); }
fbq('init', '1321385257908563');
fbq('track', 'PageView');
fbq('trackSingle', '1321385257908563', 'ViewContent', { content_name: 'chrome-110-web-share-api', content_category: 'news web-development' }); } });