Is it possible to interact with Gmail using AJAX (Javascript)? [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I would like to build my own interface for gmail, by programatically interacting with the actual Gmail service and pipe all requests on my service to gmail itself.
The user would have to login to his or her gmail account, after which my app needs to be able to interact with the gmail service.
Is there an API available for Javascript that would allow me to do this?
Any other related feedback is appreciated as well. Thanks.
Update: one site that might have done what I am trying to do would be otherinbox.com, unless they proxy all e-mail through their own servers (this is something I do not wish to do, as I want people to interact with gmail directly through a Javascript API).

If you can do everything you want as a browser plugin on top of Gmail, by monitoring and observing what goes on, you might want to take a look at this. It won't quite do what you're asking for, but it gets you somewhere along the path.
Gmailr
Unfortunately, you're probably going to need a server. Even if you could work around the cross-domain issues, Gmail's interface is basically built dynamically with JavaScript when the page loads. So the JavaScript function names will be changing on you literally all the time.
Just about everybody doing anything like what you're describing (we provide an alternative interface to Gmail as well at emailga) has gone this route. I know the OtherInbox guys as well, and they have a server component that uses the IMAP interface to do most of their magic.

i think you need to create a custom mail server which can connect to gmail via pop3 or imap or smtp.
on the other hand i am sure that ajax requests cannot be cross domain requests, but the php can do this. so you must need a php file wich access to the gmail through pop3|imap|smtp or ajax. but only javascript cant do that.

Please look at Gmail API.
I think you can work with it, although, I haven't investigated it in depth.
hope it helps.

Related

WordPress for java developer, is this possible? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am a Java developer and I know Rest APIs. But what if I want to make great webpages using website building tools like WordPress and then with Rest API I can connect with my backend server.
Will that be a viable solution or I should look for something else?
On a very basic research I got to know that wordpress runs on PHP, but I am not looking to learn PHP at this point of time.
I am looking for the below things :
1 - Some tool which helps in building rich HTML page, that has drag
and drop options.
2 - I am thinking to use Spring boot for
configuring Rest API.
Basically I am looking for some suggestions in building good websites having knowledge of Java. (And yes I still need to learn Ajax and Javascript.)
I might be absolutely wrong on what I am looking, but any suggestion will be of great help.
A REST client (in your case a website) doesn't care what programming languages/technologies were used to create the server. You can have a server hosting a WordPress website (PHP) and have another server for your REST API created in Java or whatever other language you might want to use. If you want to make REST calls from your WordPress server (e.g. for server-side rendering), you'll need to use PHP. The more likely scenario is that the website makes REST requests from the browser, in which case you'll need to use JavaScript.

Easiest way to go about writing basic data back to a server database [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am totally new to writing back data to a server, so this question may be phrased slightly wrongly.
I am building a website that will have multiple fields for users to input values. I am planning on using JS (probably with Jquery) to pass these values to be stored on some kind of database. I would then like to recall the values and display them back into the site (again using JS).
Ill have to make some calculations based on all the values within the database and would like the end result of these calculations to also be called back onto the website through JS.
Basically i dont even know where to start.. everything i read about this topic seems to be aimed at someone who already knows how to initially set up a database and what kind to use. My scripting is rather on the basic side, so something fairly intuative from the database would be really handy.
Does anyone have any suggestions what sort of database i should set up and how i can begin learning this?
Take a look at https://www.codecademy.com
It's free and they have easy to follow courses that will teach you all the technologies you'll need to know to build an interactive web application.
You should check out php (server language) and mysql (database). You should install wamp if you are on a windows server, or mamp for mac. Play around with php and then create your database and play with that. In mysql there is a new interface called PDO for database connection and database requests, you might wanna look into that. Google is your friend and read a lot and try stuff, that is how you learn it. you might also wanna consider taking online classes.

Is it ok to split a web site in two portion? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am developing a social network. This network requires its content easily readable by google. At the same time, i want to give perfect user experience with fully ajax support. As you know ajax and google not good friends(as far as i know). I tought a solution that split web site in to 2 pieces of views on a same URL(for all sites URLs):
Authenticated users.
UnAuthenticated users.
As you expect Authenticated users will get fully ajax support and excellent user experience. And when google's bots come to me social network as a UnAuthenticated user it easily can read all the content(of course no ajax any more).
On the other hand, I know that there is a technic called Hijaxing. But it seems hard to implement for all site.
I am gonna use
1. Asp.net mvc 3,
2. jQuery
What you think, what should i do? Thank you :)
It is possible to make AJAX content crawlable by Google. See here for how to do it.
My recommendation is to create a Google friendly home page (non authenticated users) and once a user is loged in, you can use all ajax-javascript you want.
Don't worry about the private sections (google bots can not enter there), but for public sections you'll need to take care of writing unobtrusive JavaScript (jQuery helps a lot on this). Try to open the page with JavaScript disabled in your browser, if you can read the important keywords, google will do as well.
Also, Google bots can point to #hashed urls. Google Ajax Crawling gives you more information on this.
Good luck, your "social network" will be a very very complex project. Much more than you can imagine.
Google has a guide that you can use to expose your AJAX content to its crawlers. You can find it here : http://code.google.com/web/ajaxcrawling/docs/getting-started.html
Ideally, you'd be making a fully functional site that doesn't require AJAX to work. But this may not always be possible or desired with modern web applications.
Also, I'd assume that Authenticated and Unauthenticated users would have a different experience in any case? If yours is a social network, most of your content would be behind a privacy wall (unless it's mostly open). If it's all open, I'd suggest that you use those guidelines to expose the content rather than building two sites.

Website script injection scan [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Does anyone know of any script injection scanners that are able to detect if your website has been compromised (i.e. javascript that has been injected that should just not be there)?
Update: found what I was looking for - http://sucuri.net/
It is difficult: you need to test every URL of your application and check if specific patterns are present in the reply (and it is very difficult to have a good algorithm which can understand which is good and bad javascript, or you need to configure this scanner which can be long and tricky).
There is a realtime open source solution called mod security on the server side. It is a web application firewall: it can detect specific patterns in requests and / or responses. It works on apache as a module. This is mainly a production solution, and does not detect injection during development. Furthermore, you need some experiences to tune it (what is good and wrong in the data exchanges with our clients) which can be tricky and does not protect against new attacks or more intelligent attacks (re-encoding characters for instance).
By the way, another solution is to use Content Security Policy but it is not available in all browsers (well, no one at the present time, wait for Firefox 4 ;-).
You can't.
Because a bad script will always be able to rewrite/neutralize your scanner function when it arrives on the browser.And your server doesn't have any control of what happens in your page anymore.
There is a simple way to protect your page from injection: place all the untrusted content using an iframe pointing on a different subdomain or port on your server.
You get the Same Origin Policy that sandbox the iframe and prevent the access to ressources of the parent page.
Then you may want to communicate safely between the iframes and the main page.If you target modern browsers or mobiles you can use window.postMessage to send string messages.
For older browsers, there are some tricks here is a blog post with a solution
This does not protect you against cross site scripting, but this is another issue you can solve with a secret token in the parent page.
The StopBadware group offers a free scanning service. Google and Mozilla rely on this service for their "this site may harm your computer" warnings.
The scanning service is available here:
http://www.stopbadware.org/home/reportsearch
Details on protecting your website are here:
http://www.stopbadware.org/home/security

Tracking user actions - analytics for applications [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm closing in on finishing a Windows Desktop Gadget that downloads plugins from my web server. I'm wondering how I can track the use of these plugins for reporting purposes like seeing which plugins are popular in which countries, how many times a plugin is used per day/month/week and other stuff like that.
Logging this on every user action could cause my server problems as there'd be constant requests. Is it best to keep a local log and upload it to the server on a regular basis or is it possible to use something like Google Analytics or another provider for this sort of thing?
If you are using javascript to create your gadget, it should be possible to include the Google Analytics scripts. You can then call the function _trackPageview whenever your user does something you want to track.
It is also possible to use Google's analytics without javascript.
The trick is that Google's scripts normally put the image http://www.google-analytics.com/__utm.gif into your web pages. Parameters can be passed to the image via the query string. You can find a list of the parameters you can pass to the query string here. What you'd have to do is figure out what the query string should be and have your client make the request to google's image every time the user does something (after setting up your google analytics account, of course).
I would suggest you to use Deskmetrics a desktop analytics app, very similar to GA. It's awesome.
Checkout Trackerbird Desktop Software Analytics which works on Windows/Mac apps.
Disclaimer: I am affiliated with company.

Categories

Resources