Question

I've been designing a website and when testing it I normally run it by either double clicking on the file or pressing "play" and running through a browser via Internal Server using Aptana Studio.

Earlier I downloaded XAMPP and browsed the web page using Apache, and i've noticed some changes. Why would running it through Apache make the content differ? It's random things like the centering of a dynamic img or a title not being shown in a custom jQuery popup, where they would act as they should when just browsing using the File. Can anyone shed any light on why it would differ?

Thanks, Donald

Was it helpful?

Solution

I guess you are developing a xhtml/xml compatible webpage. Apache transmits a content type with your document, most likely the right one. A .html file loaded from the disk is always assumed as text/html. This can lead to subtle differences in the rendered page.

Check if the content type and rendering mode (quirks or strict) in your browser differ when loading from different sources.

Create a minimal file with a xhtml doctype and load it once with .html and .xhtml file extension and compare the content type.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top