Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Oh come on! I wanna try something really cool for the New Year! (too many *15* yr. olds getting into web dev. , gotta keep my reputation intact, y'know? )
Oh come on! I wanna try something really cool for the New Year! (too many *15* yr. olds getting into web dev. , gotta keep my reputation intact, y'know? )
You don't write a mail server that runs a in a web browser because the idea is absurd. I wouldn't like to say that it is technically impossible to do so, but it wouldn't make any sense at all to even consider trying and it would be very, very, very (add in as many more 'very' as you have breath for) complicated.
As acid_kewpie already said the Gmail web interface is just a web page. A fancy web page, but just a web page. There is no 'server' running in the web page. AJAX, in case you don't already know (you didn't know what POP and IMAP are which makes your question of how to write a mail sever that runs in a web browser all the more ludicrous), is Asynchronous Javascript And XML. Traditionally when you wanted to have a web page send data to a web server or display new data that had been receive from the web server you could only do this by reloading the web page. That's still the case in fact if you don't use Javascript. AJAX allows you to send data to the web server in the background without having to reload the web page and also receive new data from the web server in the background which can then be passed to some more Javascript which can up date the web page content without reloading it. (See also using the Document Object Model to manipulate the content of web pages via Javascript.)
The GMail web interface is able to tell that you have got new email without you reloading the web page or manually checking because it contains at regular intervals is uses AJAX calls to talk to the servers at Google and ask them if you've got an new mail in your inbox. When you write an email and hit send some Javascript uploads what you typed to Google's servers along with details of who you want it to be sent to and Google's servers then turn that in to an email and sent it out.
What Gmail does to notify you of new email has nothing to do with what a mail client such as Thunderbird or Evolution would have to do.
The reason typing was slow on your 'really old' machine was probably because your really old machine was, well, really old. Hence slow. The default Gmail interface does have a lot of Javascript it and Javascript needs CPU cycles to run it so if you have a very old slow processor it might struggle. Or it could just have been that your CPU was also busy doing other things. It could also be that your really old machine had very little RAM and had use it all up so and was using the harddisk for swap space as you were typing. Running out of RAM and having to start using swap on harddisk will always make a machine very slow to respond. GMail does have a plain HTML interface without all the Javascript for use on old machines.
I'm concerned you don't even know what a server is...
---------- Post added 12-01-11 at 09:00 PM ----------
Eh I meant "listener" - sorry, not something that would, AFTER something (a request) came in, get something from disk and spit it to the network, like a web server or whatever... JUST a listener.
Quote:
Originally Posted by acid_kewpie
You didn't know that?? Did you think it was pixies making the emails appear? How could there possibly not be data flowing in the background?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.