There is a popup window like above that shows up.
I'm guessing that's a security thing where the remote person can't decide what to share... even if it's done by websocket/JS that runs on the person sharing.
Related
I have done some research for xamarin.forms to see what is the best way to navigate to a driving destination (longitude, Latitude) with excellent user controls. It seems there is no point in re-inventing the wheel, especially when its as complicated as googles fantastic maps solution.. So it seems there are two legal and simple ways: a embedded browser control / webview, or using Device.OpenUri.
So, Device.OpenUri is the most responsive, and easy way to get someone to a destination but how can I return the user to my app after they reach their destination? I would prefer not to rely upon them pressing the 'back' button to exit maps as this might be not intuitive to the user.
What do you think?
EDIT: ok so I realized my question is not maps related at all, because its not hard to track the phones GPS location. All I need to accomplish this, is: to re-activate (or 'Show') my app. So after I call Device.OpenUri, I think my app will still be running, so regardless of what program is currently 'on top' or active, what code can I run to bring back the current app? Or, would this need to be a 'notification' which would then allow the user to manually switch back?
My use case is that I would like to automate the majority of a test that navigates through a series of pages, but would like a user to be able to manually intervene at particular points in that series.
Ideally this would look something like the following:
user has a simple web-based client that launches the browser via puppeteer on a remote machine (say, via some REST call or something)
once the automated navigation kicks off, the user can essentially see the remote browser "streamed" to their browser, in a way that allows them to interact with it
in effect the user would be running a separate browser within their browser
Is there anything in Puppeteer that would allow me to do something like this? If not, what approaches should I look at that may work?
I was wondering if it is (easily) possible to update a webpage when there is an action on another webpage.
Example: I check a checkbox and on another webpage, which is already open, there need to be a change. This must be done instantaneously and the time must be as small as possible.
I do not have any code written yet, so i can't show anything.
My first thought would be to put the result of the checkmark in a database with javascript and check the database with ajax every 10 ms on the other webpage.
But i know this will be too slow for me.
Is there a better way to do this (relatively easy)?
No, that is usually not possible without both websites coming from the same domain, and that domain establishing communication between the two Javascript sandboxes run in these two windows.
The point here is that what you describe would be called a cross-site-scripting attack (short XSS attack) and is the security nightmare of every browser developer and website admin.
I have a page that is just a non interactive display for a shop window.
Obviously, I don't link to it, and I'd also like to avoid people stumbling across it (by Google etc).
It will always be powered by Chrome.
I have thought of...
Checking User Agent for Chrome
Ensuring resolution is 1920 x 1080 (not that useful as it is a client side check)
Banning under robots.txt to keep Google out of it
Do you have any more suggestions?
Should I not really worry about it?
Not that I would EVER recommend what I'm about to suggest - how about filtering by IP address. Since you provider IP is rarely going to change you can use Javascript to kick out or deny requests from IP addresses other than yours. Maybe a clean redirect to http://www.google.com or something silly like that. Although I would still suggest locking it down with a login and password and just have it write a never expiring cookie. That's still not a great idea but a shy bit better than the road your trucking down right now.
You could always limit the connections by IP address (If you know it ahead of time/it's reliable):
Apache's access control
If it is just for a shop window, do you even need access to a web page?
You can host the file locally.
Personally, I wouldn't worry about it, if no-one is linking to it externally it is unlikely to ever be found by search engines.
Client has a dating site and would like to have a popup (either a nice javascript overlay or a new browser window popup. we're flexible.) displayed to users when another user is visiting their page.
I'm familiar with push technology and Comet but it's quite challenging to implement this and may place serious strain on a server with over 100,000 unique visitors per day.
I'm wondering if there is a way of faking this, perhaps by not being accurate to the second. I can't really think of any way.
This is a classic LAMP environment.
Anyone?
EDIT: what about this: placing an iframe on the page that refreshes every few seconds and at each page load it checks in the db if a visitor has been logged on this profile page. if so, it shows a message. the message would be visible but the background of the iframe would blend in with the background of the site and be invisible. if the message fades in and out, it would look like a JS box "popping up".
The only way to "fake" comet is via polling of some sort, which is always a possibility. An iframe, xhr, or jsonp request are all possibilities for performing said polling.
You might be better off purchasing a pre-built comet server (I'll recommend, of course, the one I helped build, WebSync for IIS/ASP.NET). If you're worried about the load, you could check out our On-Demand version where we'll host it for you.
Regardless, WebSync (or whatever other pre-packaged product you might check out) would scale to a hundred thousand users a day without much of a problem, and would potentially be more efficient than polling, since it would only hit your database when new users arrived, rather than every couple seconds; that said, if you keep the "check for new users" query simple enough, and a few seconds of delay is OK, the polling idea would be the "simpler" solution.
Check out http://en.wikipedia.org/wiki/Web_Sockets if you want to do real push. This isn't widely supported in browsers yet, but there are plenty of JavaScript and Flash libraries that provide it already.
Or a cheaper way is to record in your DB each page view.
Then when any user makes a web request, check in the DB if anybody has visited their page since their last web request.
If so, pop up your dialog.
This second way wouldn't popup anything if the user just left their browser sitting there, but if they were actively interacting with the site, it would achieve your goals very easily.
I would start with this second simpler solution, which is very easy to implement. If your client wants it more interactive, you can provide solutions and tradeoffs/costs for various options.
Gather statistics as to how many visitors that user's website gets per day, and then subdivide that, so that it's a percentage chance that the user will be told there is a user on his site (even if there actually isn't), based within the timeframe he's at the part where he can receive the popup. I think this is the closest you are going to get without having some sort of notification being sent.
You could do this to minimize server usage if you wanted push:
When a user visits a website, check and see if the person who would be getting the notification is online and capable of being notified, and if so, THEN do all the push stuff, otherwise forget it.