New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 617382 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Last visit 20 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Chrome "Save-As" feature does not properly handle pages loaded via AJAX

Reported by tomac...@gmail.com, Jun 4 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36

Steps to reproduce the problem:
1. Goto any website that is generated via JavaScript (ie. not static content)
2. Attempt to save the file
3. Now view the file

What is the expected behavior?
The "Save As" should have similar output to the page as it initially appeared

What went wrong?
Browser's implementation of the "Save As" feature predates the introduction of Dynamic JavaScript Applications. At that time, the page did not change, and so returning the server output was acceptable.

Now, the DOM Document is changing, and the application should save the present state of the document, as does the "Print" button and "Save As" in regular document editors.

Given that the latest HTML code is always visible in the inspector, this should not be difficult.

Did this work before? No 

Chrome version: 50.0.2661.102  Channel: stable
OS Version: OS X 10.11.1
Flash Version: 

I saved a webpage yesterday, hoping to store the info, but when I went to view it, it was garbage. Now, I have to print everything to PDF.
 
Components: Blink>SavePage
Labels: OS-Android OS-Chrome OS-Linux OS-Windows
Seems like a issue in Blink, so this issue would affect other platforms.
Labels: Needs-Feedback
tomac120@ - can you clarify which save page flavor you've used?

Chromium supports 3 flavors of saved pages:
1. Webpage, HTML Only
2. Webpage, Complete (= foo.html file + foo_files directory with other resources)
3. Webpage, Single File (= MHTML, to see this option one might have to use --save-page-as-mhtml flag, because this option is by default only present on ChromeOS AFAIR).

AFAIK, flavor #1 by design saves the original content (without content dynamically generated by javascript) and flavors #2 and #3 should support dynamically generated content.

If the repro above uses #1, then everything is WAI and the issue should be closed as WontFix.  If the repro above uses #2 or #3, then I'd love to hear more details (i.e. get a specific webpage where things are broken).

Comment 3 by tomac...@gmail.com, Jun 10 2016

Thanks, I did not know about that. I tried "Complete" and it worked properly. I might suggest slightly more explicit names, but my problem is fixed.

On Mac there is no single file option, btw.

Comment 4 by tomac...@gmail.com, Jun 10 2016

As for explicit naming, "Webpage Source, HTML Only" would make that clear.

Comment 5 by tomac...@gmail.com, Jun 11 2016

Or "Webpage, HTML Source Only".
Project Member

Comment 6 by sheriffbot@chromium.org, Jun 11 2016

Labels: -Needs-Feedback Needs-Review
Owner: lukasza@chromium.org
Thank you for providing more feedback. Adding requester "lukasza@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: lukasza@chromium.org
Owner: ainslie@chromium.org
ainslie@, could you please take a look?  My apologies for assigning a random bug - I hope that you can route this bug to the appropriate UI/UX person.

Would it make sense to consider tweaking the UI strings here?  AFAIU the confusion here was whether "Webpage, HTML Only" would include 1) only the original, static HTML content VS 2) dynamically generated HTML content.


Description of save flavors:

- "Webpage, HTML Only" saves only the original, static HTML content (without any modifications)

- "Webpage, Complete" saves the current HTML content which includes content dynamically generated by javascript (this save flavour also slightly alters the HTML content so that links refer to locally saved files).

- "Webpage, Single File" - this behaves like "Webpage, Complete", but puts all the html and subresources into a single MHTML file.


Current IDS_SAVE_PAGE_DESC_HTML_ONLY string + various alternatives (proposed in #c4 and #c5 above + some ideas from me):

- Current string: "Webpage, HTML Only"

- Alternative: "Webpage, HTML Source Only"

- Alternative: "Webpage, Original HTML Only" <- my vote / proposal :-)


BTW: I am not sure if we are constrained wrt the length of the UI string.  I guess not, because Save-Page-As is not exposed on mobile devices AFACT.  OTOH, maybe the file dialog dropdowns have some limitations on the various platforms we support?


FWIW, I've checked on Windows and AFACT the "Webpage, Complete" is the default option, so I guess one could argue that a user has to go out of their way to pick a different save flavor.

Comment 8 by tomac...@gmail.com, Jun 13 2016

As far as the comment that "user has to go out of their way to pick a different save flavor", I would add I chose "HTML Only" to store in a single file and because I did not need the images. I wasn't aware that a dynamic option even existed and the terminology "HTML Only" vs. "Complete" does not make clear any difference except the storage of resources locally. Strictly speaking, it is not a choice of "format" but a timeline (saving the current state of the document vs. saving the document before it was loaded).
Owner: talo@chromium.org
I'm probably not the right person. talo@ is thinking much more about saving pages in general right now so might have better ideas. 
Status: Available (was: Unconfirmed)
Labels: -Needs-Review
Cleaning up sheriffbot label "Needs-Review" label as a part of modified "Needs-Feedback" sheriffbot rule. [ref bug for cleanup 684919]
Same happens with form POSTs.

If you fill in the form here (you don't need real data, first name and project is all that's needed):
https://www.freebsd.org/cgi/monthly.cgi

Hit Download XML the XML will be rendered. Now right click and choose "Save As".

The resulting file will contain the HTML of the form and not rendered output of the form POST.

Lost work due to this bug :(
We actually found that this works find when using "Complete" option and were just discussing naming conventions. Not sure how that works for POST.
The complete option is not available for XML, so I'd suggest another ticket for that.
Project Member

Comment 15 by sheriffbot@chromium.org, Jul 3

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Assigned (was: Untriaged)
This bug has an owner, thus, it's been triaged. Changing status to "assigned".

Sign in to add a comment