Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a HTML page which references external stylesheets and shows some images. I'm looking for an easy way to include all referenced external resources in the HTML file directly, so that it doesn't have any external references any more. (Images should be included in the HTML file using the <img src="data:image/jpg;base64,[...] method).

EDIT: I want to do this so that my web proxy can deliver a nice-looking error page if the backend is down, so I have to assume all my webservers cannot deliver the static content which would normally be linked to from my websites (CSS, images).

share|improve this question
add comment

1 Answer 1

Converting external sources to internal, may confuse search engines that crawl your site, as they will see different content when something has happened, eg: "backend is down, services are restart etc".

If you only want build this mechanism, just in case that the backend is down, and you are concerned about your site rankings, I suggest that you set a 503 maintenance page instead.

Whenever an error is raised, for example "could not access database", set your frontend state to 503, and display a nice page that will inform your users that the website is under maintenance and it will be online again in a while.

Also you could inform yourself by sending an alert email / sms, in order to monitor and fix these short downtimes.

share|improve this answer
    
Thanks, you nicely describe why I want to do this ;) The reason I'm asking this question is because I want to set up a 503 maintenance site that still looks nice when the backend is down and cannot serve images and css any more. The proxy (Pound) can serve one single HTML page in case of a 503, but if I want this one single file to include all necessary data (images/css) so that the maintenance page looks nice to the client. –  andreas-h Mar 12 at 6:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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