Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I'm considering using modern techniques to protect my Javascript code and am studying how the DOCTYPE element selection may impact that. Specifically, the linked question used IFrames which are not permitted in certain selections of DOCTYPE.

In taking a broader view of this question, not specifically linked to the IFrame protection, are there any other considerations to take into account when choosing a DOCTYPE for my site?

share|improve this question
1  
Possibly related: stackoverflow.com/questions/12333398/… –  Adnan Mar 28 '13 at 17:49
    
Since DOCTYPE is a layout engine selector, I don't see this as a potential security but merely a compatibility concern. That said, it would be a good practice to only use AJAX relevant parts of your code on user agents that are compliant with a selected DOCTYPE and serve others a non-AJAX version. –  TildalWave Mar 28 '13 at 18:12

1 Answer 1

Document types (or DOCTYPE) is a declarative and semantical element which is part of the W3C specification regarding markup languages documents (such as XHTML).

Their presence (or non-presence) within a markup document does not influence a whatever security aspect when they are being rendered and processed by a web browser.

If you are writing an XHTML 1.1 document, there is a DOCTYPE for it, same if you are writing an HTML5 document.

We say that these elements are essentially semantical rather than functional.

share|improve this answer
1  
Great answer! Thanks ;) –  TildalWave Apr 5 '13 at 17:38

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.