-1

Could you please check my code, Is this correct?

window.open('https://www.mywebsite.com','_blank','noreferrer noopener')
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
Jacky
  • 63
  • 1
  • 6
  • 2
    I'm voting to close this question as off-topic because this questions belongs to [Code Review](https://codereview.stackexchange.com/) – Jorge Fuentes González Mar 03 '20 at 10:37
  • Read these articles you will get what went wrong https://www.w3schools.com/jsref/met_win_open.asp https://developer.mozilla.org/en-US/docs/Web/API/Window/open – Not A Bot Mar 03 '20 at 10:37
  • @JorgeFuentesGonzález — [No, it doesn't.](https://codereview.stackexchange.com/help/dont-ask): "Code Review is for open-ended questions about code that already works correctly (to the best of your knowledge). Questions seeking help about debugging or understanding code are off-topic for Code Review, and may be on-topic for Stack Overflow." – Quentin Mar 03 '20 at 10:46
  • @Quentin But is not looking for debugging or trying to understand the question. Just asked to review the code without any further information. Maybe I've should voted to close with "Asking for debug, but more info needed", but as far as I can read, I only see a code review job. – Jorge Fuentes González Mar 03 '20 at 10:50
  • 2
    I think answers to this question is useful for future readers. I know that question is not providing enough detail and not fit the rules of asking. But good answers are also useful. eg. https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage – Ritesh Khandekar Mar 03 '20 at 11:02

1 Answers1

1

No.

See MDN:

windowFeatures
A DOMString containing a comma-separated list of window features given with their corresponding values in the form "name=value". These features include options such as the window's default size and position, whether or not to include scroll bars, and so forth. There must be no whitespace in the string. See Window features below for documentation of each of the features that can be specified.

Your list is space-separated, not comma-separated.

Also:

noreferrer
If this feature is set, the request to load the content located at the specified URL will be loaded with the request's referrer set to noreferrer; this prevents the request from sending the URL of the page that initiated the request to the server where the request is sent. In addition, setting this feature also automatically sets noopener. See rel="noreferrer" for additional details and compatibility information. Firefox introduced support for noreferrer in Firefox 68.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335