213
Views
3
Comments
Solved
Mobile - Redirect to External URL is giving error 400
Question

Hi,

I am developing a personal mobile app where I wanted to redirect to external URL from a link.

I have used javascript code to redirect but its giving error as described below:

Code:

window.open("https://www.google.com", "_blank");


Error: 

{"Errors":["The 'Name' HTTP Header is missing in the request."],"StatusCode":400}


Can anyone explain me what I am doing wrong?

Regards,
Palak Patel

2018-08-27 08-29-35
Fábio Vaz
Solution

Palak Patel wrote:

Hi,

I am developing a personal mobile app where I wanted to redirect to external URL from a link.

I have used javascript code to redirect but its giving error as described below:

Code:

window.open("https://www.google.com", "_blank");


Error: 

{"Errors":["The 'Name' HTTP Header is missing in the request."],"StatusCode":400}


Can anyone explain me what I am doing wrong?

Regards,
Palak Patel

Hi Palak,


Try with InAppBrowser plugin


UserImage.jpg
Davide Résio

Hi Palak,


How did you implement the redirect logic?

I tried your code snipet on a simple "icon click > client action with the js code", on my ToDo application, and I had no problems.

Besides, I'm not using the InAppBrowser plugin.


Best regards,

Davide Résio

2026-03-16 00-00-40
Palak Patel

Hi,

I am able to solve the issue using InAppBrowser plugin.

Actually I was redirecting to a location which is having path of Excel file on my personal environment.
By using direct Javascript, it was not working.
But with InAppBrowser it worked as expected.

Thanks,
Palak Patel

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.