My site is served over HTTPS all the time to protect users data, etc.
But, I do have some SVG HTML tags which come with xml Namespace links. Those links are HTTP NOT HTTPS:
xmlns="http://www.w3.org/2000/svg"
Is this an issue? Should I make all of these HTTPS?
No, that is not an issue and you should definitely not convert those to https.
To be even more precise, those URIs are even not links, that is a namespace URI of a namespace definition. HTML is not namespace aware, so for HTML they don't have any effect. XML on the contrary is namespace aware and changing even a single character of a namespace URI is comparable to changing the element names. XML is related to this question because SVG is an XML language.
Related
is it possible, or how could I make it so, I can include my topbar file into my page, I'd prefer it not to be with php since I am not hooked up with localhost yet.
Thanks for all help in advance!
HTML5 now allows you to include html files like you can already include a css file via an import. However, this would only be helpful for during your development stages and not for the final production version since the feature currently is only available in Chrome and will take time for the other browsers to adopt: http://www.html5rocks.com/en/tutorials/webcomponents/imports/
If you don't want to use PHP nor any other server-side scripting language,
you can use either <iframe> or <frameset> tags, which are deprecated, or perform an AJAX request using Javascript that embeds your HTML page dynamically. Second approach will work only if the page you're trying to attach is located within the same domain due to XSS protection in modern browsers.
It's more of a server thing, so to speak, so you would have to rely on the server more for this. Because, you cannot simply do this using static script, like HTML. There's no "built-in function" that can do this, it's not HTML's thing.
I mean, server will offer you more than one option, for example:
You can:
Use SSI (Server-side Includes) if server supports it.
Use PHP or ASP includes.
Otherwise, you can use AJAX for this, won't cost you as much as the above options.
If you mean "header" by saying "topbar", I think it's not a good idea to use iframes.
Files which are truly HTML parsed files can not include another file to my knowledge.
If you web server will parse php you could simply change the extension of the the main file to .php and include() the topbar file:
mv index.html index.php
index.php:
include_once("topbar.html");
Use <!--#include file="footer_text.html" -->
inside html page.
Plz, check below url for details.
https://www.lifewire.com/include-html-file-in-another-3469529
Using Google Page Speed, I get a message, "Avoid a character set in the meta tag," with a link to a page which tells me all about why I shouldn't use a meta tag to define the character set.
But my pages (WordPress) don't specify the character set in the meta tag. Instead I've done it by placing this at the top of the theme's header.php:
<?php
header('Content-Type: text/html; charset=utf-8');
?>
My questions are:
is my method of specifying the character set correct ?
if it is, why is Google's PageSpeed tool complaining about a non-existent meta tag specification ?
Check the HTML code of your page, as sent to browsers and other user agents. (E.g., use View Source when viewing the page in a browser.) The odds are that there is a meta tag that declares character encoding (“character set”). It might be generated by the authoring software you’re using.
In my tests, the only way to trigger the message when using https://developers.google.com/speed/pagespeed/ was to prevent a server from sending encoding information in HTTP and to include a meta tag for it. It is understandable in such a setting that performance may be degraded.
Otherwise, the advice from Google Page Speed in this issue is bad advice. You should declare the encoding in a meta tag in addition to declaring it in HTTP headers, as the page might be saved locally in that case, when the local copy is opened, there won’t be any HTTP headers.
In the views in codeigniter, we can write code for forms using codeigniter. For example for an url the code in codeigniter is:
<?php
anchor('site/myfunction','Send');
?>
My question is whether is better write this code with html in the views:
Send
It's an example, but the question is with all HTML helpers for views. CodeIgniter's user guide suggests to use PHP functions rather than code html. The php code requests to the server while html does not. Is better use the CodeIgniter for HTML? I don't know if when I use CodeIgniter's helpers, the framework has contemplated these requests.
I apologize for my english. Thanks for your answer.
The reason you want to use CodeIgniters library is for the ability to quickly modify your HTML elements site-wide with very little work. For instance, let's say you wanted all <a> tags on your site to have a class added called "ajax". Using the anchor helper, you can accomplish this easily.
That said, I don't really foresee many solutions where you will be changing HTML elements site-wide. With semantic HTML, CSS, and Javascript I think you will be perfectly fine without having to use CodeIgniters HTML helpers. Also in my opinion your code will be much more readable. Use HTML.
Regarding performance
When you say "code php does requests to the server while html, no" you're wrong because whenever someone visits your site they are requesting the server. The question here is how much work the PHP engine is doing versus just your normal webserver. In this case, a function call is trivial for PHP and shouldn't be considered performance wise.
Regarding urls
The answer by Pi is focused on the fact that URL resolution in CodeIgniter can be weird, but with proper .htaccess or web.config configurations you should be able to use vanilla hrefs without using CodeIgniter functions.
You should not use
Send
Because it might not work everywhere. But if you use this:
Send
There will be no big difference. Pure HTML is a bit faster but unless you have a high traffic website that does not matter. Using the CI function is nice if you are in a library because you do not want to mix PHP and HTML to much to keep up the Model-View-Controller concept. What you use in a view is a matter of style what you like more.
Personally I think the codeigniter form functions are not very good and I am often use html instead.
We are working on adding some Facebook Connect functionality to our site. Part of their requirements for FB Connect require adding several additional xmlns attributes to the html element. We are likely going to have 5 or 6 of their custom attributes by the time we're done, and I want to know if this will negatively affect our page performance. I.e. will these be additional resources that the browser has to download?
I have checked in Firebug and I don't see additional requests, but I don't know if that is because requests are not made by the browser, or if Firebug simply doesn't track them.
No. Namespace declarations are for identification only; take no more resources than storing any other attribute/value pair.
Although it is customary to use resolvable URIs for namespace identifiers, no XML processing tool will actually attempt to fetch that URI.
I'm trying to make a BEA Portal website XHTML compliant, because this has been written in the contract with the client, and I'm stuck on this problem: BEA renders <meta> and <link> tags without the closing slash, i.e. <link/> and <meta/> as it is required by XHTML.
When I look at the documentation from BEA it seems that it should be possible to make it render the tags with a closing slash: The skin.properties file (edocs.bea.com).
Is it possible to change the redering with a configuration directive? Or perhaps, to hook into the underlying redering method so that I can fix it?
Try a tag-rewriting filter implemented either as a rewrite rule in a reverse proxy or as a filter servlet. Wouldn't suggest looking for the answer in the portal itself...
For software that doesn't use XML serializer, XHTML is pointless (see numerous other questions on SO about XHTML).
If you want to make page more standards-compliant, I suggest aiming for HTML4.01 Strict or HTML5 (with CSS for layout of course – it's not XHTML-specific thing).