Characters allowed in a URL

前端 未结 9 951
没有蜡笔的小新
没有蜡笔的小新 2020-11-22 05:33

Does anyone know the full list of characters that can be used within a GET without being encoded? At the moment I am using A-Z a-z and 0-9... but I am looking to find out th

9条回答
  •  旧时难觅i
    2020-11-22 06:28

    If you like to give a special kind of experience to the users you could use pushState to bring a wide range of characters to the browser's url:

    var u="";var tt=168;
    for(var i=0; i< 250;i++){
     var x = i+250*tt;
    console.log(x);
     var c = String.fromCharCode(x);
     u+=c; 
    }
    history.pushState({},"",250*tt+u);
    

提交回复
热议问题