5

Possible Duplicate:
Is there a limit to the length of HTML attributes?

I want to use data- attributes to pass JSON between scripts on a Web page. For example a div tag could look like this:

<div data-choices='{"name1":"Jack","name2":"Jeff"," name3":"Zoe"}'  />

This is similar for example to what the dojo toolkit does with options, but in my case the JSON string could be much longer.

Are there any size limitations for data- attributes (W3C recommendation, browser constraints, etc.)?

Community
  • 1
  • 1
Christophe
  • 27,383
  • 28
  • 97
  • 140

0 Answers0