Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

What is the maximum length of a bookmarklet?

  • 4 replies
  • 1 has this problem
  • 424 views
  • Last reply by cor-el

more options

I am packing whole programs into a bookmarklet to automate tasks at a workplace. What is the maximum length a bookmarklet can be in the current firefox version? I should clarify I don't have a problem, but I am requesting information.

I am packing whole programs into a bookmarklet to automate tasks at a workplace. What is the maximum length a bookmarklet can be in the current firefox version? I should clarify I don't have a problem, but I am requesting information.

Chosen solution

I gave it another test and can get to 65536. One byte longer and I get an error in the Browser Console.

Read this answer in context 👍 1

All Replies (4)

more options

To the best of my knowledge, because bookmarklets are handled as URLs, there's no real set limit. However, the practical limit for URLs in Firefox appears to be 32KB maximum.

Generally speaking, creating a browser extension is more practical than a bookmarklet and relatively easy to make. There's not a huge amount of extra work involved to convert a bookmarklet into an extension and you don't have to list it on the Firefox add-ons website (although you have to submit it for the automated signing process).

Hope this helps.

more options

I think that the maximum for a bookmarklet is a few tens of bytes below 64KB (around 65500 bytes; I have one over 64000). Keep in mind that some bytes are escaped (space => %20; double-quote=> %22) and thus can take up extra space.

more options

Honestly, I thought getting an addon signed for private distribution would be a lot more complicated then that. Thank you cor-el for answering the size question, but knowing this I will probably just make it an extension.

more options

Chosen Solution

I gave it another test and can get to 65536. One byte longer and I get an error in the Browser Console.