简体   繁体   English

为什么javascript不能更好地支持cookie和查询字符串?

[英]Why doesn't javascript have better support for cookies and querystrings?

It seems like cookies and querystrings are firmly established in the web world. 似乎饼干和查询字符串在网络世界中牢固地建立起来。 Nevertheless, javascript makes you do all kinds of splits and parsing to get at the keys and values. 尽管如此,javascript使您可以进行各种拆分和解析以获取键和值。 Anyone have any insight on why there isn't more intuitive native support for things like cookies and querystrings? 任何人都知道为什么没有更直观的原生支持,如cookie和querystrings?

Admittedly, there are plugins and frameworks that make this stuff a little better. 不可否认,有一些插件和框架可以让这些东西变得更好。 I just want to understand why there had to be plugins and frameworks to handle basic stuff like that in the first place. 我只想了解为什么必须有插件和框架来处理这样的基本内容。

That's not a problem with javascript - it's a problem with the DOM. 这不是javascript的问题 - 这是DOM的问题。 Unfortunately the DOM API has many problems - Browser makers aren't perfect. 遗憾的是,DOM API存在许多问题 - 浏览器制造商并不完美。

There really should be better support for this though. 尽管如此,确实应该有更好的支持。 The W3C including it as a standard in the HTML spec would be a good start. 包含它作为HTML规范标准的W3C将是一个良好的开端。

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

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