Closed Bug 428046 Opened 12 years ago Closed 12 years ago
saved webpages with broken formatting/layout due to missing stylesheets
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:184.108.40.206) Gecko/20070725 Firefox/220.127.116.11 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:18.104.22.168) Gecko/20070725 Firefox/22.214.171.124 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
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: @importSave
You need to log in before you can comment on or make changes to this bug.