Bookmarking long URLs (/javascript) are truncated without warning




8 years ago
4 months ago


(Reporter:, Unassigned)



3.6 Branch

Firefox Tracking Flags

(Not tracked)





8 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv: Gecko/20100914 Firefox/3.6.10 FirePHP/0.4
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv: Gecko/20100914 Firefox/3.6.10 FirePHP/0.4

The URL above produces an innocent SVG clock with Javascript that makes it "tick".  I converted the page contents to a single "data:image/svg+xml;base64" URL.  The URL is long, maybe longer than standards recommend, but it works in Firefox (and Safari, FWIW).  When I click on the star icon in the Location box of the toolbar, it appears that a bookmark was created successfully.  I can click the star a second time to alter the bookmark name and tags.  However, when I access that bookmark, it is truncated.  FF did not give any warning that the bookmark would be truncated.

Also, when I go to the bookmark organizer and edit the properties of the bookmark, it lets me enter the longer URL, apparently without trouble.  However, the URL is still truncated upon access in the brwoser.  Reloading the bookmark properties in the organizer reveals that it's truncated there, too.

Again, FWIW, Safari has no problem making a bookmark of this long URL.

Reproducible: Always

Steps to Reproduce:
1. Access a very long URL, like the data URL for the SVG clock with Javascript.
2. Attempt to bookmark the long URL.
3. Access the bookmark to find it has been truncated.
Actual Results:  
The truncated URL results in an incomplete document.  FF reports:

XML Parsing Error: unclosed token
Location: [omitted here due to length]
Line Number 269, Column 7:      <path

Expected Results:  
A ticking mechanical clock in SVG.

Comment 1

8 years ago
Build identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0b10pre) Gecko/20110118 Firefox/4.0b10pre

I was not able to reproduce it.

Comment 2

8 years ago
If you weren't able to reproduce the problem, what happened?  Were you able to bookmark the very long "data:" URL?  Which URL did you attempt to bookmark.

I realize that I should have been more specific about which URL to test with. I've tried to include the URL in this comment, but it's longer than this site  allows.  I've created a web page with this URL as a link on my personal web site:

The URL in the link is the one I tried, so this is the one that others should test, too.
#define URI_LENGTH_MAX 65536
Is it really needed to have a uri longer than this size? Looks like the use-cases for it would be pretty much limited.

Comment 4

8 years ago
The purpose is to encode web applications as URLs for use on mobile devices even without a network connection.  For example, a web application could be kept on an iPod touch without being written as an iOS application and it would still work when no wi-fi signal is available.

My attempt to bookmark such a URL with Firefox was to test the completed application.  Firefox is able to handle and display this long URL, but it's not able to bookmark it.  That's inconsistent.

Comment 5

8 years ago
I should say, my point of filing this bug report was not to suggest that Firefox should support longer URLs.  I expect that a URL this long (about 84011 bytes) is probably non-standard and probably wouldn't be supported.

My point is that Firefox didn't display an error message warning that the URL was too long before truncating it.  I expect a dialog box to appear that tells me the URL can't be bookmarked and I'd need to click an "OK" button to close the dialog.

The warning is what's needed.


8 years ago
Version: unspecified → 3.6 Branch


8 years ago
Severity: major → enhancement
Ever confirmed: true


6 years ago
OS: Mac OS X → All


6 years ago
Duplicate of this bug: 865108

Comment 7

6 years ago
Sad day today.  I have been a loyal FireFox user for 12 years or so.  But I am now switching to use Google Chrome as my main browser.  At least until this fixed.  I do not want to do but I have no choice.  I opened another bug report 865108 but someone closed it and marked as duplicate although I do not feel it is truly a duplicate of this bug.  I really need my JavaScripts to work properly without what is now adding up to be so much wasted time.  It is becoming unbearably annoying to have to paste them in over and over again every time I restart the browser.  I am at my wits end here.  Can someone please let me know, is there a limitation with FireFox architecture that prevents this from being solved?  If not, can someone please either fix or give me access to fix it?  Thank you!


6 years ago
Keywords: dataloss

Comment 8

2 years ago
A configurable max URL length for bookmark would be nice, especially for those using very long bookmarklets (
Duplicate of this bug: 865108
Summary: Bookmarking long URLs are truncated without warning → Bookmarking long URLs (/javascript) are truncated without warning


4 months ago
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.