0

I'm using Cmd+S to save webpages in Chrome and for most pages it saves the assets to a folder as well. This usually includes the CSS and images. Thus when you open the local HTML file in Chrome, it'll appear very similar to the original page (tested with articles from The Atlantic, Washington Post, WSJ).

However, for Wikipedia, the CSS seems to be in PHP files and the resulting local HTML file won't render correctly out of the box (there seem to be multiple load.php files, which I suspect to be the problem). Is there a Wikipedia-provided solution? Or alternatively can I fix this CSS with some renaming/editing of the HTML?

  • 1
    FWIW Firefox saves the page in a format that works (in both Firefox and Chrome) - it renames all CSS resources to .css. – Tgr Jul 6 '19 at 19:10
  • @Tgr you should add this to your answer! – personjerry Jul 6 '19 at 21:29
3

The issue is that most CSS and Javascript is dynamically generated via PHP files, which get saved with a .php extension, and Chrome seems to be unwilling to load those files when you open the saved page (presumably because it guesses the content type based on extension). Maybe there's some configuration setting to override that, but the simpler solution is to use some extension that will inline the CSS, such as Save Page WE. (Alternatively, you could save as PDF, which does not require any extensions. Or use Firefox, which seems to get this right - when saving a full page, it renames PHP files to something matching their content type.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.