急求大神告诉,Go能不能操作h5的localStorage,如果能怎么清除localStorage缓存的数据,如果不能,该怎么办?在退出登录的时候清除localStorage缓存。下面是退出代码,怎加上清除localStorage
func Logout(c *middleware.Context) {
c.SetCookie(setting.CookieUserName, "", -1, setting.AppSubUrl+"/")
c.SetCookie(setting.CookieRememberName, "", -1, setting.AppSubUrl+"/")
c.Session.Destory(c)
c.Redirect(setting.AppSubUrl + "/login")
}