16
votes

does anybody know URL length limitation for Microsoft Edge? As you know, Internet Explorer has limitation for URL length, Maximum length is 2048. How about Edge? I guess, it should be gone for now...

3

3 Answers

17
votes

The limit appears to be around 81578 characters. After that, I get a silent failure with no request made to the server.

The URL I was using to test looked like:

http://xx.xx.xxx.xxx:xxxx/?81578-characters-here

I'm not sure whether the length of the host name is factored in.

It's also worth noting that the limitation here was supposedly a problem with Windows itself rather than the browser (sorry, no reference). It appears the issue was addressed in Windows 10, so running this same test on IE11/Windows 10 yields a similar result.

5
votes

It looks like this is the only place that talks about the url limitation of MS Edge. I couldn't find any official information about this. Anyway, I had to validate this myself and turned out that the limit of the query string is in fact 4035 characters on MS Edge (v40.15063.674.0 is what I used). Here's a simple (and stupid) default.htm I used for a quick testing.

<!DOCTYPE html>
<html lang="en">
    <head>
        <script>
            alert(window.location.search.length);
            var url = "http://localhost/default.htm?10000-characters-here";
            window.open(url);
        </script>
    </head>
    <body>
    </body>
</html>
0
votes

This has been an ongoing question for me when building complex image links to quickchart.io, e.g.

<img src="https://quickchart.io/chart?encoding=base64&devicePixelRatio=1&c=eyJ0e ...>

For this scenario, Jerry Han's answer was of 4035 consistent with my observations in June, 2020. However, I've observed that the correct answer depends on the version of Edge. As of today, however, I'm seeing a 4741 character test link (which failed last summer), work just fine in the latest version (89.0.744.63) of Edge.

Test your code if you need to go huge, but today's answer may just be: "It depends on the version, but Microsoft has increased the limit recently and your giant links will probably just work with the latest version of Edge."