2

I'm trying to find any javascript code that helps me to shorten an URL (amd decode it after as well). I can't use any existing service because I'm working on an emailing software that doesn't allow external connections.

I will really appreciate your help.

Many thanks.

AAC

3
  • I can't think of a way this could work. Can you elaborate? Commented Dec 21, 2010 at 21:43
  • 1
    FYI -- Not all email clients support javascript to be run inside the email Commented Dec 21, 2010 at 21:46
  • 1
    @Jakub, very true. MOST email clients don't support javascript in an email. Commented Dec 21, 2010 at 21:54

2 Answers 2

6

No.

URL shortening works by generating a random id, and linking it to the real URL in a database. When someone visits a URL containing the id, a database lookup is performed and then they are redirected.

It isn't a compressed version.

Sign up to request clarification or add additional context in comments.

Comments

1

Not possible, as David stated.

Also Javascript is disabled in most email clients due to this type of method to track users. You could always try creating your own server side application, but like you said if there are no external connections allowed from the email, then you are out of luck.

1 Comment

All right, all that's true, FYI my emailing system handles javascrip to manipulate users data and create dynamic content, then a pure HTML template is sent to the subscriber. So as I can't create my server side app neither, what I look for is more a encrypt/decrypt function (that shorten a bit some paramenters from my original URL - something like mydomain.com/ENCRYPTED).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.