I introduced Content Security Policy (CSP) in a website, nonetheless some of its commands and implications seem to negatively affect Google Page Speed Insights ranking.
That happens in certain CSP configurations (the ones for example which do not introduce
'unsafe-inline'), since by not allowing the introduction of inline style sheets nor inline scripts, a very important security measurement provided by CSP avoiding code injection, the page cannot in these CSP configurations be rendered so fast because inline data avoids page render blockig.
'unsafe-inline' in CSP, it's much harder to get better ranking in Google Page Speed Insights. But CSP
'unsafe-inline' improves security avoiding code injection, therefore I'm trying to find a balance between these two issues, CSP and Google Ranking from Page Insights.
- Does the existence of Content Security Policy (CSP) affect positively Google ranking?
- How important is ranking from Google Page Speed Insights in the overall Google Ranking?