March 3, 2016

immortal session cookie in Chrome

It’s very interesting, we set a session cookie for users who logged in system, and we expect after he/she close browser the cookie will be deleted, that’s for security consideration. But I found even I closed Chrome, when I open it again, the session cookie is still there! That’s the reason. I have modified setting to my default, but “Continue where you left off” is very useful sometimes.

March 3, 2016

cookies domain

There are some RFCs about HTTP state management: RFC2109, RFC2965, RFC6265. My environment is Chrome Version 47.0.2526.106 (64-bit), I use tornado set cookies. As the RFC content, if you provide domain field in Set-Cookie, you should keep a dot at the beginning of domain name, if you forget, the http client should help you. You can ignore domain field, then the domain value will be set as same as request host. Read more

March 3, 2016

Some critical changlog of wechat mp

UPDATE: I found use snsapi_base can get user’s union id, but you can’t get it directly like before. Few weeks ago, I was developing wechat web app, I found I can get user’s union id directly via get access token interface, but yesterday, I found this interface didn’t provide union id unless you use snsapi_userinfo as the scope value. So I changed scope, use snsapi_userinfo, you will get a warning when you’re authorizing on web app no matter whether you subscribed the account or not. Read more

February 23, 2016

Ubuntu Open file limit

UPDATE:If you run supervisor as root, just set minfds to right value (32K or 64K), supervisor will increase hard limit value if current value is not enough and run as root, it’s the simplest way! Several days ago, my elasticsearch came across Too Many Open files error, the straight forward way is modify ulimit conf, but today I came across this error again, so I walk a wrong way before. Read more

February 21, 2016

mobile website development

以iPhone 6(使用Chrome developer tools)作为参考效果调试界面,iPhone 6竖屏css宽度750px,根据lib-flexible框架计算html font-size为750/10=75px。 px单位与rem换算方法:例如某按钮宽度为150px,则在iPhone 6效果下的rem尺寸为html像素尺寸除以根元素font-size大小,即150/75=2rem。 图片如何自适应?设置到div的background-image中,设置background-size为100%,再调整div的尺寸,即div在不同设备下尺寸变化,背景图全部填充div也会因此而变化。 「像素」「渲染像素」以及「物理像素」是什么东西?它们有什么联系? rem 产生的小数像素问题 从网易与淘宝的font-size思考前端设计稿与工作流 lib-flexible github iconfont.cn SASS(use scss!) material design front-end library 论material design网格规范设计和前端手机rem尺寸如何配合 微信调试 https://github.com/amfe/article/issues/17

Powered by Hugo & Kiss.