User:Tumu/GameTech

From The Urban Dead Wiki

Jump to: navigation, search

Technical "issues" noticed with LiveHTTPHeaders and Firebug: (since 28th August 2007, updated on 25th May 2009)

  • Login cookie path is set to too broad. This is caused by using cookie path of /. Targetting the game action scripts with a path-prefix (eg. /cgi/map, /cgi/skills..) would allow using more specific cookie path. This script prefixing would remove the game cookies from any requests for static game content (like images and stylesheets), reducing network traffic and user visible game latency. When a cookie matches an url, page request is always made to the server to inform about the cookie, even if nothing needs to be transferred (where static content results in not modified responses), delaying page display.
    • Following examples allows naming the scripts on filesystem as .cgi where user visible addresses are using /cgi/ or /s/ (using mod_alias on Apache):
      • ScriptAliasMatch ^/cgi/(.+) /path-to-scripts/$1.cgi (/cgi/map)
      • ScriptAliasMatch ^/s/(.+) /path-to-scripts/$1.cgi (/s/map)
      • ScriptAliasMatch ^/s/(.+)\.cgi /path-to-scripts/$1.cgi (/s/map.cgi)
  • Login cookie expiration is set to very long, with cookie expires key. Removing the expires key would make the cookie session only. The game logic already implies session based access with player AP limit and host IP-hit limit.
    • Response on log-in: Set-Cookie: player=name-hash; path=/; expires=Thu, 16-Jan-2010 12:00:00 GMT;
    • Response on log-out: Set-Cookie: player=bad; path=/; expires=Thu, 16-Jan-2005 12:00:00 GMT;
    • Details: Cookie spec
  • Page connections are dropped after every player action. Closing of connection after each action results in unnecessary delays. Having proper keep-alive connections would save on server load and network traffic. As the server uses Transfer-Encoding: chunked responses which includes data size, only adding the keep-alive response header is needed.
  • To further reduce network traffic, the Server header in page responses is unnecessary long, it can be shortened by using ServerTokens Prod line in game server configuration.
    • Response: Server: Apache/2.0.54 (Fedora) (on 28th August 2007)
    • Response: Server: Apache/2.2.3 (CentOS) (current as of 25th May 2009)
  • Invalid and unnecessary Content-Language header present. Can be removed from game logic (or mod_headers Header unset line can be used to remove it).
    • Response: Content-Language: cgi
  • Site Favicon (www.urbandead.com/favicon.ico) is using invalid Content-Type. Should be image/vnd.microsoft.icon (or older deprecated image/x-icon).
    • Response: Content-Type: text/plain; charset=UTF-8
    • Details: Wikipedia
  • Streets.gif contains JPEG artifacts. As the content itself is very simple, the image has most likely gone thru GIF->JPEG->GIF saving cycle, destroying it's quality and size. Size of original artifacted GIF is 2942 bytes and cleaned up PNG 430 bytes.
Original GIF (2942B)
Artifact free PNG (430B)
  • PlayStation 3 web browser results in generic 'network errors' on most player actions. The actions are done if the error page is refreshed from the browser Triangle menu.
Personal tools
project wonderful
column-okay