服务咨询热线:

022-88711099

当前位置:

近期开发简单web服务器的一些总结

发布时间:2014-07-21 7:57 作者:夜风冷 访问量:1409

近期开发简单web服务器的一些总结

首先,说一下web服务器的字符集,最好默认UTF8,然后,MIME映射关系,只考虑静态页面的我用到了如下一些,供大家参考:

  { "htm", "text/html" },
            {"js","application/x-javascript"},
            {"go","application/x-javascript"},
            {"map","application/x-navimap"},
            {"svg","image/svg+xml"},
            {"snippets","application/x-javascript"},
            {"ttf","application/octet-stream"},
            {"woff","application/x-font-woff"},
            {"ico","image/vnd.microsoft.icon"},
            {"cur","image/vnd.microsoft.icon"},
            { "html", "text/html" },
            { "xml", "text/xml" },
            { "txt", "text/plain" },
            { "css", "text/css" },
            { "png", "image/png" },
            { "gif", "image/gif" },
            { "jpg", "image/jpg" },
            { "jpeg", "image/jpeg" },
            { "zip", "application/zip"}