简体   繁体   English

jsp和html5 localStorage大小

[英]jsp and html5 localStorage size

I have encountered an issue on which I could not find any solution. 我遇到了找不到任何解决方案的问题。 I need information about localStorage size which is calculated looking at keys stored, in my javascript function, however I need that information inside my jsp page, is there any way I could do this? 我需要有关localStorage大小的信息,该信息是通过查看存储在我的javascript函数中的键来计算的,但是我需要在我的jsp页面中包含该信息,有什么办法可以做到这一点?

LocalStorage is a client/browser thing. LocalStorage是客户端/浏览器。 You can't access it by java, because when jsp is running, is on the server. 您无法通过java访问它,因为当jsp运行时,它就在服务器上。 You'll have to send the information to the server, there is no other way. 您必须将信息发送到服务器,没有其他方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM