blue pine
blue pine

Reputation: 458

How to solve No 'Access-Control-Allow-Origin' header is present on the requested resource in google browser?

I want to print web page, so I placed button like this.

<a href="javascript:staffinfoprint()"><b>print</b></a>
........
function staffinfoprint()
{
    window.print();
}

When I click a tag, the web page is supposed to be printed.

But I got errors in google browser console as follows;

"Access to XMLHttpRequest at 'https://www.google.com/cloudprint/printer?xsrf=&hl=en-GB&printerid=__google__docs&use_cdd=true&printer_connection_status=true' from origin 'chrome://print' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource". enter image description here And the preview window was not opened.

How can I solve this issue?

Upvotes: 1

Views: 257

Answers (0)

Related Questions