Michael Lundstrom

Clickurl Javascript Max Length On Iexplorer

Recommended Posts

Hi,

 

I need to send a long string parameter to javascript when clicking on a chart. It works great in Firefox but once the string gets too long (somewhere around 500-1000 chars) Internet Explorer refuses to execute the javascript. Splitting it up into several parameters or function calls doesn't solve it either, it is as if there is a max size to the clickURL attribute in Internet Explorer.

 

Did you run into this before? Is there a fix?

 

Kind regards,

Mike

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi Mike,

 

Thank you for the post.

 

According to Microsoft, Microsoft Internet Explorer has a maximum uniform resource locator (URL) length of 2,083 characters. Internet Explorer also has a maximum path length of 2,048 characters. This limit applies to both POST request and GET request URLs.

 

If you are using the GET method, you are limited to a maximum of 2,048 characters, minus the number of characters in the actual path.

 

However, the POST method is not limited by the size of the URL for submitting name/value pairs. These pairs are transferred in the header and not in the URL.

 

Can you please provide us with the live URL so that we might be able to test it ?

 

Also, please let us know if you see any particular error in the console.

 

Awaiting your response !

Share this post


Link to post
Share on other sites

Hi Mike,

 

Thank you for the post.

 

According to Microsoft, Microsoft Internet Explorer has a maximum uniform resource locator (URL) length of 2,083 characters. Internet Explorer also has a maximum path length of 2,048 characters. This limit applies to both POST request and GET request URLs.

 

If you are using the GET method, you are limited to a maximum of 2,048 characters, minus the number of characters in the actual path.

 

However, the POST method is not limited by the size of the URL for submitting name/value pairs. These pairs are transferred in the header and not in the URL.

 

Can you please provide us with the live URL so that we might be able to test it ?

 

Also, please let us know if you see any particular error in the console.

 

Awaiting your response !

 

I'm not passing a URL but doing a javascript call. I guess that when Flash talks to the browser the browser handles the same maximum path length and therefore it won't work. I'll look into minifying the string and see what I can do about it. Apparently Firefox has a max length of somewhere around 65k which explains why it works there.

 

Kind regards,

Mike

Share this post


Link to post
Share on other sites

Yeah... IMHO the JS function is executed via the browser's URL call. That might limit the total length of the clickURL attribute. Did you check whether the JS variants of charts have the same effect in your implementation?

Share this post


Link to post
Share on other sites

Due to the framework we use I'm stuck with the Flash one. I ended up going through all parameters and only taking the ones I need and truncate the string as much as possible so it just fits now.

 

Thanks for the help and I hope this thread can help someone else in the future.

 

Kind regards,

Mike

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now