0

I have an application which are in both desktop and mobile version. When I use same application on both devices at a time, the URL should be same. Means when request changes in mobile , the desktop version should also change automatically according to the mobile request. Is it possbile..Please help

saveesh p m
  • 33
  • 10
  • So, if a user has their phone and desktop machine running in sync on your website or something? You want the user to constantly see the same thing on their desktop and mobile device at any particular point in time? – jqueryHtmlCSS Oct 28 '20 at 12:09
  • Yes exactly. I have done like this - Using set Timeout() function calling ajax function continuously to check in database if the url is changed or not, If it is changed the URL will change accordingly. Is there any other better way instead of calling Ajax function continuously... – saveesh p m Oct 28 '20 at 12:16
  • Does this help? https://stackoverflow.com/questions/40112669/change-url-of-a-link-depending-on-whether-or-not-they-are-on-mobile https://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-mobile-device/3540295#3540295 – jqueryHtmlCSS Oct 28 '20 at 12:23
  • Somewhat like getting notification on stackoverflow without refreshing the webpage. – saveesh p m Oct 28 '20 at 12:25
  • Right, so you probably already know how to detect for mobile and change the url, but you need code to instantly change the url on both devices? – jqueryHtmlCSS Oct 28 '20 at 12:26
  • Thanks for your response. Yes. Is there any best way to do this. – saveesh p m Oct 28 '20 at 12:30
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/223749/discussion-between-natel-and-saveesh-p-m). – jqueryHtmlCSS Oct 28 '20 at 12:33

0 Answers0