X
Tap here to go to the mobile version of the site.

Fóram Tacaíochta

location.assign('') not same as location.assign('/')

Postáilte

location.assign('/') takes me to home page of site location.assign() does nothing (MS edge goes to home page) Not sure which is right, but would like consistency between browsers, for now using location.assign('/')

location.assign('/') takes me to home page of site location.assign('') does nothing (MS edge goes to home page) Not sure which is right, but would like consistency between browsers, for now using location.assign('/')
Luaigh

Tuilleadh mionsonraí faoin chóras

Breiseáin Shuiteáilte

  • Shockwave Flash 32.0 r0

Feidhmchlár

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

Tuilleadh Eolais

jscher2000
  • Top 10 Contributor
8790 réiteach 71880 freagra

https://developer.mozilla.org/docs/Web/API/Location/assign says if you don't supply a valid URL, the browser will throw a syntax error.

https://developer.mozilla.org/docs/Web/API/Location/assign says if you don't supply a valid URL, the browser will throw a syntax error.
An bhfuil an freagra seo cabhrach?
Luaigh

Úinéir na ceiste

Not sure, one browser says it is OK Firefox says not

Not sure, one browser says it is OK Firefox says not
An bhfuil an freagra seo cabhrach?
Luaigh
jscher2000
  • Top 10 Contributor
8790 réiteach 71880 freagra

I suggest using MDN and the caniuse site for cross-browser compatibility information.

I suggest using MDN and the caniuse site for cross-browser compatibility information.
An bhfuil an freagra seo cabhrach? 0
Luaigh

Úinéir na ceiste

Could you give me specific URL names?

Could you give me specific URL names?
An bhfuil an freagra seo cabhrach?
Luaigh
jscher2000
  • Top 10 Contributor
8790 réiteach 71880 freagra

MDN is the site I linked to before, Mozilla Developer Network.

caniuse: https://caniuse.com/

MDN is the site I linked to before, Mozilla Developer Network. caniuse: https://caniuse.com/
An bhfuil an freagra seo cabhrach?
Luaigh
Cuir ceist

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.