Closed Bug 398839 Opened 12 years ago Closed 12 years ago

Forgotten CSS '@import' instruction when using 'Save As...' (complete html)


(Firefox :: General, defect)

Windows XP
Not set





(Reporter: geompse, Unassigned)




User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/20070914 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/20070914 Firefox/

(excuse my english i'm french)

When saving some page using the 'complete' options, files are written to the disk this way :
- main html in the specified dir
- other files in a subdir of the specified dir

For this to work, i believe you know that the main html page is partially rewriten :
- <img /> tags have their src attribute modified
- <script> tags have their src attribute (if any) modified
- <link /> tags have their href attribute modified
and so on...

=== Problem is, the CSS @import command is not modified like the correspond HTML <link /> is. ===

As you can see on the screenshot linked to this report, both script have their src attribute redirected to the subfolder site_officiel_fichiers (french version of firefox too =^^= sorry), whereas the @import directive is not affecte (./include/Style.css) was an existing file on the server (relative to the saved page).

(for testing purpose, the original web page is "")

I have this problem with a lot of websites, since @import is commonly used.

There is the same problem with every url() instructions (CSS), for example in :
Again, page saving do not rewrite this part of the source...

Reproducible: Always

Steps to Reproduce:
1.Select a website with @import directive in a CSS document or between <style>..</style> tags
2.File->Save As..
3.Open the saved document, you will notice the difference
Actual Results:  
Well, since the CSS is not loaded, the page layout is a little different. Also some images does not appear.

Expected Results:  
Firefox should have written to the disk a perfect clone of what it displays.
Two solutions :
 - using the actual method, rewrite @import and url() directives too;
 - using another technique, save the current generated DOM structure, with everything that lies in the browser cache.

I believe Firefox has the same behavior in another language version, but i would like to say again that i use the french version (might have its importance)
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.