Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The resource from “https://www.linkedin.com/countserv/count/share?format=jsonp&…ack=...” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff) #237

Open
MikeAlhayek opened this issue Oct 24, 2019 · 5 comments

Comments

@MikeAlhayek
Copy link

First of all, thank you for this amazing plugin! I am using it on my website, but getting the following error in the console.

The resource from “https://www.linkedin.com/countserv/count/share?format=jsonp&…ack=jQuery33103800949475974904_1571936242760&_=1571936242761” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

X-Content-Type-Options: nosniff

Also, when looking in the "network" tab of the "developer tools", OI see 4 http requests to linkedin.com that return 404 errors.

Is this an issue with the plugin, or is there something on my end that needs to change for this issue to be fixed?

Additionally, this script seems to issue HTTP requests for social media url when the page is loaded. Can't I configure it to only issue the HTTP request when the user clicks on the share? It sounds to me lots of extra/unnecessary round trips which increase the page load and bandwith usage. My thought, when a user clicks on "Facebook" share button, then issue the HTTP request to facebook and then show the share window, so the HTTP is not called until the user really want to share the page. This could help with increasing page load and reduce bandwith usage specially when a user is on a mobile device.

@MikeAlhayek
Copy link
Author

Any updates on this issue?

@lohic
Copy link

lohic commented Oct 30, 2019

modifying line 475 in dist/jssocials.js seems to correct the error

linkedin: {
   label: "Share",
   logo: "fa fa-linkedin",
   shareUrl: "https://www.linkedin.com/shareArticle?mini=true&url={url}",
   countUrl: ""
},

@lohic
Copy link

lohic commented Oct 30, 2019

so it's line 47 in src/jssocials.shares.js

@lybuneiv
Copy link

Any updates on this issue?

@Ruud68
Copy link
Contributor

Ruud68 commented Jun 15, 2020

the fix proposed by @lohic is correct: linkedin stopped (years ago) with providing these counts, so fetching the counts from linkedin returns an error because.
When looking at the last time a change was made in this repo and the lack of communication around issues from the maintainer it is safe to conclude that this repo is abandoned: so the software still works, but fixes etc. need to be done by yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants