2

Ok here is the thing. Our site has a bookmarklet and it works fine in all major browsers except Safari. I investigated and found out that it was because of two reasons:

  1. Safari 5.5 has a 2347 char limit on any URL.
  2. It encodes the URI.

I've solved problem 1 by renaming the variables & functions to very short names and also by minimizing the js.

For problem 2, I decided to store the whole function as a string, decodeURIComponent it and then use eval to evaluate back to a function and then execute it (I know I shouldn't be using eval but I can think of no other solution). The problem is that decodeURIComponent returns "URIError: URI error". But if I execute the same code in the developer console for Safari, it executes without any problem.

I am at my wits end. Any help would be greatly appreciated.

Thanks in advance.

GarbageGigo
  • 303
  • 2
  • 10

0 Answers0