how increase the size limit in IE bookmarklets(favlets)

H

HopfZ

Internet Explorer 6 bookmarklets(favlets) has size limit. And its size
limit depend on the kind of code.
For example, CODE A and CODE B (below) are both at their size limit.
CODE A does not work (as a bookmarklet), but if you replace the number
44444 at the end to 4444, then it works. CODE B is much longer than
CODE A, but if you replace OO in the regular expression to O, then it
works. I don't know why they have different size limits. Does anybody
know what kind of coding pattern increase or decrease the size limit?

CODE A (294 characters)
javascript:(function(){ alert('start'); var t = "1"; t = t + 1 + 2 + 3
+ 4; t = t + 1 + 2 + 3 + 4; t = t + 1 + 2 + 3 + 4; t = t + 1 + 2 + 3 +
4; t = t + 1 + 2 + 3 + 4; t = t + 1 + 2 + 3 + 4; t = t + 1 + 2 + 3 + 4;
t = t + 1 + 2 + 3 + 4; t = 1; t = t + 111 + 22 + 33 + 44444;
alert('end');})();

CODE B (399 characters)
javascript:(function(){ alert("start"); function getSel() { var t = "";
if (window.getSelection) { t = window.getSelection(); } else { if
(document.getSelection) { t = document.getSelection(); } else { if
(document.selection) { t = document.selection.createRange().text; }
else { return (""); } } } return ("" + t); } var textt = getSel(); var
re = /\:\s*(http\:\/\/\S+)\bOO/gi; alert("end:"); })();
 
W

web.dev

HopfZ said:
Internet Explorer 6 bookmarklets(favlets) has size limit. And its size
limit depend on the kind of code.
For example, CODE A and CODE B (below) are both at their size limit.
CODE A does not work (as a bookmarklet), but if you replace the number
44444 at the end to 4444, then it works. CODE B is much longer than
CODE A, but if you replace OO in the regular expression to O, then it
works. I don't know why they have different size limits. Does anybody
know what kind of coding pattern increase or decrease the size limit?

CODE A (294 characters)
javascript:(function(){ alert('start'); var t = "1"; t = t + 1 + 2 + 3
+ 4; t = t + 1 + 2 + 3 + 4; t = t + 1 + 2 + 3 + 4; t = t + 1 + 2 + 3 +
4; t = t + 1 + 2 + 3 + 4; t = t + 1 + 2 + 3 + 4; t = t + 1 + 2 + 3 + 4;
t = t + 1 + 2 + 3 + 4; t = 1; t = t + 111 + 22 + 33 + 44444;
alert('end');})();

CODE B (399 characters)
javascript:(function(){ alert("start"); function getSel() { var t = "";
if (window.getSelection) { t = window.getSelection(); } else { if
(document.getSelection) { t = document.getSelection(); } else { if
(document.selection) { t = document.selection.createRange().text; }
else { return (""); } } } return ("" + t); } var textt = getSel(); var
re = /\:\s*(http\:\/\/\S+)\bOO/gi; alert("end:"); })();

Although there is no universally defined character limit, Internet
Explorer, starting from IE4.0 has a max length for urls. This applies
to bookmarklets as well. For reference:

http://support.microsoft.com/kb/q208427/

If you can only achieve that many characters, then there must be
something else you're missing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top