CSS和JavaScript出现在源代码中 [英] CSS and JavaScript appearing inline in sourcecode

查看:132
本文介绍了CSS和JavaScript出现在源代码中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行平稳的网站,但我刚刚看到,在Chrome和IE9中查看源代码时,它会显示我的css和javascript内联,而不是指向文件的链接。 < style type =text / cssstyle =display:none> [my css]< / style> ,而不是 < link rel =stylesheettype =text / csshref =style.css/> ,这是我在PHP编辑器中看到的,在其他网站上我看不到这种情况,只有我的情况。

这怎么可能?服务器设置有一些变化吗?

解决方案

浏览器工具只是简单介绍它,使您的调试变得更加简单。这只是为了向您显示页面的流程。这些文件仍然是外部的,并在许多页面上共享。


I have a website that runs smoothly, but I just saw that when I'm viewing the source, in Chrome and IE9, it shows my css and javascript inline instead of the link to the files. <style type="text/css" style="display:none">[my css]</style> instead of the <link rel="stylesheet" type="text/css" href="style.css" /> that I see in my PHP editor and that I coded on purpose. I don't see things like this on other websites, only at mine.

How is this possible? A certain change in server settings?

解决方案

The browser tools are just in-lining it to make your debugging easier. This is merely a convenience to show you the flow of the page. The files are still external and shared across many pages.

这篇关于CSS和JavaScript出现在源代码中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆