<system.webServer>
...
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="DENY" />
</customHeaders>
</httpProtocol>
...
</system.webServer>
Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts
Thursday, November 5, 2015
Prevent "Click Jacking"
One way to prevent "Click Jacking" is to prevent other sites from displaying your site in a frame. To accomplish this, simply add this to your web.config:
Tuesday, January 21, 2014
Updating code to use modern web standards - HTML5 and XHTML5
I am working on several sites that were developed 5-10 years ago, and they are all having compatibility issues with the newer versions of IE. Since IE 8, the answer has been the Compatibility Mode function. However, this button and its associated function is being phased out. It's now buried in the menu of IE 11, so I'm concerned about it's going away with IE 12. I'm starting to research and fix the sites so that they display properly in modern browsers.
The majority of the problems is that the site "just looks bad" without compatibility mode. The first step is to change the markup, so that it meets current standards. Using Visual Studio, I'm validating all markup with XHTML5. I'm not introducing any new HTML5 tags. I'm simply changing the existing markup so that it isn't flagged by the validator. I'm also fixing any display issues that crop up.
What is HTML5 and XHTML5? HTML5 is the latest and greatest version of HTML. Modern browsers support most of the standard. Older browsers support only the stuff that has been around forever (tables and input tags and such). XHTML5 is the XML version of HTML5. It is basically the same thing except that XHTML5 is slightly stricter. For example, HTML5 will let you write a tag and not close it. XHMTL5 requires lowercase letters just like XML does.
I think XHTML5 is appropriate to validate your markup with since it is a bit more strict, and forces you to write tidier markup.
The majority of the problems is that the site "just looks bad" without compatibility mode. The first step is to change the markup, so that it meets current standards. Using Visual Studio, I'm validating all markup with XHTML5. I'm not introducing any new HTML5 tags. I'm simply changing the existing markup so that it isn't flagged by the validator. I'm also fixing any display issues that crop up.
What is HTML5 and XHTML5? HTML5 is the latest and greatest version of HTML. Modern browsers support most of the standard. Older browsers support only the stuff that has been around forever (tables and input tags and such). XHTML5 is the XML version of HTML5. It is basically the same thing except that XHTML5 is slightly stricter. For example, HTML5 will let you write a tag and not close it. XHMTL5 requires lowercase letters just like XML does.
I think XHTML5 is appropriate to validate your markup with since it is a bit more strict, and forces you to write tidier markup.
Tuesday, August 13, 2013
Use Syntax Highlighter to display code in your Blogger posts
Edit the HTML of your blogger template. From your blog dashboard, click Template on the left side, and then click the Edit HTML button. Add the following to the head section.
This example is set up for JavaScript, XML, and VB, but you can find other "brushes" here:
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/
Switching to HTML when writing your post, if you wanted to demonstrate a bit of HTML, you do this:
Note that I had to escape the angle brackets with the < and >.
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeEclipse.css' rel='stylesheet' type='text/css'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js' type='text/javascript'/>
<script language='javascript' type='text/javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.all();
</script>
This example is set up for JavaScript, XML, and VB, but you can find other "brushes" here:
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/
Switching to HTML when writing your post, if you wanted to demonstrate a bit of HTML, you do this:
<pre class="brush:xml;">
<script src="StevesJScript.js" type="text/javascript"></script>
</pre>
Note that I had to escape the angle brackets with the < and >.
Subscribe to:
Posts (Atom)