jQuery on the fly URL shortener

后端 未结 6 1681
迷失自我
迷失自我 2020-12-02 17:38

I\'m looking for an on the fly URL shortener much like how tweetdeck works. I have found many jQuery and general javascript plugins that take a url and run it through a shor

6条回答
  •  执笔经年
    2020-12-02 18:12

    The on the fly bit is going to be difficult to make reliable and speedy.

    People won't type http most of the time or even www.

    The end, like you said, is going to be hard to determine if the url contains a space or worse, runs into the next sentence because the user didn't put in a space.

    And what if people need to change the url after the fact because they typed http://stakoverflow.com/ instead of https://stackoverflow.com/ ?

    I think the best solution would be an "insert shortened url" button on your text editor that allowed people to do just that. Or, do it server-side when the post is made.

提交回复
热议问题