Jump to content


Framerate in a browser


25 replies to this topic

#21 Nick

    Senior Member

  • Members
  • PipPipPipPip
  • 1225 posts

Posted 30 October 2009 - 05:52 PM

geon said:

Nick, if you want to do more than just the simplest javascripting for a single browser,you REALLY should look into something like jQuery.
Looks interesting for a lot of purposes, but it's not an option for what I'm doing. I'm writing my own extremely light-weight HTTP server, and I have no intention to even make it handle file retrieval. All it has to do is serve a string containing basic HTML and embedded JavaScript...

Quote

It abstracts away most of the retarded browser differences and annoying API:s.
Yeah, I noticed there can be a few differences in browser behavior. Anyway, I fixed the bug I was experiencing with FireFox. It asks for a favicon and I had to return 404 to avoid freezing the browser. Everything now works great no matter if I use Internet Explorer, FireFox, Chrome, Safari or Opera. :happy:

So I won't be needing jQuery any time soon, but thanks thanks for mentioning it. I hadn't heard about it before and it might come in handy one day...

#22 Reedbeta

    DevMaster Staff

  • Administrators
  • 4969 posts
  • LocationBellevue, WA

Posted 30 October 2009 - 06:15 PM

Firefox hangs if you don't serve a favicon (or 404)? Wow...you may want to report that as a bug to Mozilla, if you haven't already. ;)
reedbeta.com - developer blog, OpenGL demos, and other projects

#23 Nick

    Senior Member

  • Members
  • PipPipPipPip
  • 1225 posts

Posted 30 October 2009 - 07:02 PM

Reedbeta said:

Firefox hangs if you don't serve a favicon (or 404)? Wow...you may want to report that as a bug to Mozilla, if you haven't already. :)
I'm not sure if this counts as a browser bug. Any sever should simply return 404 on any unsupported HTTP requests, no? My micro-server simply wasn't expecting the favicon request (since that's not part of my HTML code, it's the browser itself making the request). By the way, it doesn't "hang" as in crash. It just doesn't continue executing the code since it's waiting on a response for the favicon request.

If that really means FireFox is broken then so are Safari, Chrome and Opera. :skull: They all request favicon and don't continue. Feel free to report bugs if you care. For me the actual issue is solved for as far as I care.

Ironically, favicon was introduced by Internet Explorer 4, and today Internet Explorer 8 is the only browser I didn't have any issues with. :lol:

#24 Reedbeta

    DevMaster Staff

  • Administrators
  • 4969 posts
  • LocationBellevue, WA

Posted 30 October 2009 - 08:46 PM

Nick said:

I'm not sure if this counts as a browser bug. Any sever should simply return 404 on any unsupported HTTP requests, no?

Yes, it should - but just as a security/robustness principle, it's a bad thing if the browser hangs or crashes due to the server doing something it shouldn't. The client shouldn't need to trust that the server operates properly in order to operate properly itself.
reedbeta.com - developer blog, OpenGL demos, and other projects

#25 alphadog

    DevMaster Staff

  • Moderators
  • 1643 posts

Posted 31 October 2009 - 12:04 AM

Actually, the HTTP spec stipulates that "the client SHOULD assume that the server will maintain a persistent connection, even after error responses from the server." Basically, the browsers are hanging persistently awaiting an answer. EVERY request must either be answered with a response code.

Presumably, different browsers have different but long timeouts governing this behavior.
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.

#26 Reedbeta

    DevMaster Staff

  • Administrators
  • 4969 posts
  • LocationBellevue, WA

Posted 31 October 2009 - 12:16 AM

Sure. However, the browser shouldn't hang (become unresponsive) if the server is taking a long time to respond, which is what it sounds like Nick experienced. Of course it can continue to wait for the response for as long as it likes and display an error message or some such, but it should continue to process user input while it does so. Else the user gets antsy and kills it in the Task Manager. ;)
reedbeta.com - developer blog, OpenGL demos, and other projects





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users