Open Bug 604374 Opened 14 years ago Updated 2 years ago

Bookmarking long URLs (/javascript) are truncated without warning

Categories

(Firefox :: Bookmarks & History, enhancement, P5)

3.6 Branch
x86
All
enhancement

Tracking

()

People

(Reporter: lsloan-mozilla.org, Unassigned)

References

()

Details

(Keywords: dataloss)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.10) 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:1.9.2.10) 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.
Build identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0b10pre) Gecko/20110118 Firefox/4.0b10pre

I was not able to reproduce it.
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:

  http://www-personal.umich.edu/~lsloan/long_url.html

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.
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.
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.
Version: unspecified → 3.6 Branch
Severity: major → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
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!
Keywords: dataloss
A configurable max URL length for bookmark would be nice, especially for those using very long bookmarklets (https://en.wikipedia.org/wiki/Bookmarklet).
Summary: Bookmarking long URLs are truncated without warning → Bookmarking long URLs (/javascript) are truncated without warning
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.