Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is there a limit to the number of chars u can have in url string?

    Hi all,
    I don't remember there being one but, is there a limit (there must be one but I know not what it is, or maybe I do ^^ just not exactly how many) to how many chars u can have as the location...

    i.e. my iframe's location is set using window.location.href = "http://www.somewhere.com/somefile.htm?A very long Querystring"

    Thanks for help!

    Appreciated

    is this document accurate?
    http://www.aspfaq.com/show.asp?id=2222
    Last edited by Exodious; 10-21-2005 at 05:10 PM.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,982
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts
    http://support.microsoft.com/default...;en-us;q208427

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

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Some browsers have a 255 byte limit and so you should not go over that.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Location
    Chamonix, France
    Posts
    600
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by felgall
    Some browsers have a 255 byte limit and so you should not go over that.
    Kind of mate, RFC 2068 says "Servers should be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations may not properly support these lengths" but in reality the best option is not to go above 2000 characters. The 255 limit is set by the RPC, not the browser architecture. Netscape 3+, IE 4+, Firefox (all), Safari (all), Opera (all), Konqueror (all) - all these browsers support up to 2000 characters (and most support more than this). All commonly-used proxy servers, by default, accept long (>255 character) querystrings.

    Hope this helps

    m_n
    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •