Communicating with users on other web pages - ajax

This question is part user experience, part engineering.
I am trying to find a nice, clean way to have a user communicate with my web page while they are on another web page. I have web services that will accept HTTP POST/GET, so AJAX and other asynchronous niceties are welcome - don't worry about the details of their communication, they can easily be modified to fit a solution.
The problem I'm running into lies within the user interaction. Ex., say the user is viewing a web page and they want to send my system the web site's URL. I would like it if they could do it while still looking at that page, and without too many "crazy clicks" - currently they have to go back over to my page and enter the information (as you can imagine this has tested horribly).
I have ruled out browser tool bars (easy to do in FF, but a lot of my users use IE) and local applications (they won't want to install Java or Adobe Air apps).
Have you ever solved a problem like this before, or do you have an idea of how I could solve it? Should I be looking at separate solutions for FF and IE (ex., a tool bar for FF and something else for IE)? Don't worry about Safari and Chrome, though a solution that supports them too would be nifty.
Thanks.
p.s. The user would have an account on my system already.

Have you thought about something like the Digg Bar?
Users can access it through a bookmarklet, or you can do a url prefix like http://yoursite.com/<other_site_url>. When users click links, the bar stays active.

What if you wrote a system tray application. Something similar to Pixel Ruler
This could sit in their tray, and it would know you're website. That would eliminate browser toolbars, and could conceivably work on several browsers. You could probably even set it up as an install if they visit your website.
Then you could expose a webservice on your site that this control would pass back info to (like the user's name, current website, etc)

I don't know about the details of your application, but the only solution I can imagine is that you have a page split into two frames, with your toolbar at the top. stumbleupon.com does this, but it makes sense because they're providing the web content.
Simply, your users would have to visit your site before they could do their own browsing. Is that reasonable for your project? That sounds like it could be a user experience disaster of its own. Also, if most of your users are using IE, I'm going to assume that they're not the most web savvy users out there.

Related

I want to be an Appetize.io(or Browserstack) in China. Should I learn about open source projects or knowledge?

Appetize.io or Browserstack.com can't access it normally in China, so I want to implement a tool myself. Like Appetize (or Browserstack), I can use my different versions of mobile devices to debug my webpage online, but I don't know where to start. Thank you.
Look at the Network Activity tab of Chrome Dev Tools while you are on the demo page for Appetize.io. You will see a bunch of JPEG images being streamed to the browser as you interact with the device "screen" on the browser. Most likely an emulator/simulator is fired up in the backend and screenshots are taken at regular intervals and streamed to the browser.
That would be a good start. The next thing to look at would be how to capture input (typing and screen taps) on the browser and then "execute" those type/taps on the emulator in the backend.

Wrapper around web-app under Windows

I have an application with web interface. Unfortunately, it has all disadvantages of being a web page:
It doesn't have a standalone window, so users cannot manage it via the taskbar.
Users see the address line with something like 'http://localhost:8080' that is not a good idea for home users.
If users click on a tray icon, there is no way to activate the tab in a browser, which contain the application interface.
So, it would be nice to have a wrapper application with a browser within.
In case of IE I know it's possible to create a window with Trident ActiveX component. But what if it's Windows XP with IE6 but installed latest Chrome? I'd like to prefer Chrome since it supports a lot more features which the user will never see.
So, is there a way to wrap a page into Chrome/Firefox and make it look like a standalone application, if one of them is presented in the user's system? (The application shouldn't install anything large, so Chromium build is not an option).
P.S. I'm not interested in supporting other platforms than Windows.
Regards,
Take a look at Chrome Apps.
I hope helps you.

Firefox extension app hosted on server

I managed to create a Chrome extension pretty easy and the main application is hosted on my server allowing me to provide updates to the app itself without having to update the whole extension. I like the idea and I just want to know if it's possible to create a similar extension for Firefox where the main application is hosted on a live server.
In creating my Chrome extension, I followed a tutorial. The code for Chrome is included on the linked page.
It's possible to create a simple extension that loads a web app either in a panel or a tab. You should read up on the Addon SDK documentation, including the panel, tabs and getting started docs.
There is nothing wrong with this, as the web app would not have direct access to internal Firefox APIs. If you read the Addon guidelines closely that #makyen links to above, none of it covers this implementation detail. In their defence, they seem to have misinterpreted what you want to do. It looks to me like you just want to integrate / launch your web app from the browser UI?
Web application:
After finding the tutorial (please provide a link next time) I surmise you are referring to in your question, I suspect that what you are actually attempting to convey is different than how I initially interpreted your question. I have edited the question to make this more clear to people reading it in the future.
That tutorial is explaining how to place a link to a web application into the Chrome user interface. Such is, to a large extent, just a bookmark that is able to be placed within other areas of the user interface than the bookmarks bar.
If that is what you are wanting to do, then, yes, you can easily do so in Firefox. Given that the extension is not running external content in the security context of an extension (you are effectively just navigating to and displaying a website), then that should be fine as a Firefox extension. Note that you need to be sure that you are not granting elevated permissions when you launch the web application.
If running a web application is what you are wanting to do, then I suggest you might want to use different semantics to refer to what you are doing. The above is not a "Firefox extension app hosted on server". Saying it that way strongly implies that you are hosting the actual extension code on your own server. The rest of your question implies that the extension dynamically loads external code and runs it. I would suggest that you refer to it as something like: a web application that is launched (navigated to) by a Firefox extension allowing the web application to be started from an icon in the toolbar.
Extension running web sourced code:
However, if what you are wanting to do is have external content running as a Firefox extension, then implementing that functionality is a large security hole for anyone installing the extension. Even assuming that your intentions are totally benign, there is a huge security hole for anyone who is intercepting your traffic, or gains control of your server to inject code into Firefox that runs at the level of an extension (i.e. the malware can have full control of the browser and then of the computer).
Yes, it is currently possible for you to write this for Firefox.
However, given that the extension pulls code from something not packaged within the extension, the extension will never be permitted to be hosted on AMO.
In addition, the plan is that later this year there will be mandatory signing of Firefox extensions through Mozilla. I doubt that an extension like this will be permitted at that time.
You can read a set of Add-on guidelines on MDN.

Detect the open url in Windows Mobile

What I want to do is have a background running app on Windows Mobile that can detect when a specific url is opened and perform some task. About the only way I can think of is to watch the cache directory and look for files specific to the site. There might be a way with IE to get the open url information but I doubt it would work the same for Opera. Another way might be with the querying the open processes because there might be url information in the title bar.
I can always have the user turn my app on and off when they go to my site or have the app open the site when they run it but I would like to avoid any extra steps for the user.
Can you think of anyway to detect the open url? Thanks for any help.
I think you're looking at the wrong end. Don't look at it from above the app, but rather from below. I'd create an NDIS intermediate passthrough driver (the PASSTHRU example that ships with Platform Builder would be a really good starting point) that watches network activity and looks for HTTP GET requests much like a packet sniffer would. It would be easy to extract the URIs from the packets at that point and you would be able to definitively watch the requests no matter what browser they use.

For a web application, how to close all the related browser windows when session is timed out / user signs out?

Suppose user has opened my web application in many different browser windows. After sometime he is timed out / sign out from the application.
I want to close all the related browser windows. How can we handle this?
(I think GMAIL does that)
If you maintain references to any child windows, you can use window.close() in combination with setTimeout().
As a note, you should probably exercise caution when closing users' windows, as it can potentially cause a bad user experience. Imagine that I've opened up my bank's website to look at the transactions for an account so that I can clear/reconcile them. But in the middle I run off to grab some lunch or something. When I come back, I find that all of my windows have been closed and I have to relogin, even though I didn't need to 'cause I was just looking at a relatively static list of data. Or even worse, if the window-closing isn't coded correctly, I might find that my browser has been closed entirely, which is definitely a bad experience.
Don't. As far as the typical user is concerned, your web site does not have the right to close the user's windows and they will HATE your site if you try. If you think that your web site's proper operation depends on being able to close the user's browser, then you are doing it wrong.
Furthermore, there is no way that you can count on the success of your attempt to close user windows or perform similar such actions. So spend your time making your web site work properly regardless of what the user does in the browser. Besides, it is easier that way.
Write a scriplet that when the focus is brought to the window (for your application) it checks to see if the session is still valid. If it is not, then send a command to close the window.

Resources