saved webpages with broken formatting/layout due to missing stylesheets

RESOLVED DUPLICATE of bug 126309

Status

()

Firefox
File Handling
--
major
RESOLVED DUPLICATE of bug 126309
10 years ago
10 years ago

People

(Reporter: chrizoo, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

The formatting/layout of some webpages gets broken when stored locally, because Firefox does not store the required style sheets.

Result: Firefox is not able to save some webpages correctly

[quote]Jscher2000: "For now, it appears there is a limitation in the Save...Complete feature when it comes to imported style sheets."[/quote]


Reproducible: Always

Steps to Reproduce:
1. Go to: http://en.wikipedia.org/wiki/Quoted-printable
2. save the webpage locally "save page as .... (ctrl+S)", choose "web page complete"
3. open the locally saved webpage
Actual Results:  
http://img218.imageshack.us/img218/9547/screenhunter02200804061xd0.gif

(As shown in the screenshot, the format of the locally saved webpage is broken and does not correspond to the way Firefox renders the webpage when seeing it online).

Expected Results:  
http://img237.imageshack.us/img237/2518/screenhunter03200804061br6.gif

(This screenshot shows the way Firefox renders the webpage when seeing it online. It's format/layout is not broken, as opposed to the locally saved webpage).

Since I'm technically not so advanced, I cannot explain why that happens, but some users who know a lot more about that, were able to reproduce the bug and have discussed that issue here: http://forums.mozillazine.org/viewtopic.php?t=646071

I quote them, as they seem to understand the problem:

Jscher2000: 
Looks as though the style sheets imported by the following tags do not get saved locally: 
[code]
<style type="text/css" media="screen, projection">/*<![CDATA[*/
 @import "/skins-1.5/common/shared.css?127";
 @import "/skins-1.5/monobook/main.css?127";
/*]]>*/</style>

<style type="text/css">/*<![CDATA[*/
@import "/w/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=2678400";
@import "/w/index.php?title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=2678400";
@import "/w/index.php?title=-&action=raw&gen=css&maxage=2678400";
/*]]>*/</style>
[/code]

Jscher2000: ... I got the same result as you did.
If I use the DOM Inspector to insert <link> tags for the first two style sheets (shared.css and main.css) and delete the <style> tag that imports them, then those two are saved along with the page. For now, it appears there is a limitation in the Save...Complete feature when it comes to imported style sheets.I suppose one could work around this with a GreaseMonkey script that converts @import calls to <link> tags, but it could involve a lot of testing to get it right.

Jscher2000:
I don't see anything wrong with the way Wikipedia is setting up its style sheets. I don't personally do it that way myself, but I think it is "legal." In HTML (not XHTML) you would leave out the CDATA tags. Firefox might or might not work if those were left out. I don't have time to troll the web looking for test cases.

JAB Creations: ...Firefox does have some trouble saving the page (it removes the ending slashes from XHTML elements) [...] I honestly don't think even the best composed bug will make the cut for Firefox 3 so late in to development

Updated

10 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 126309
You need to log in before you can comment on or make changes to this bug.