Is it wrong to use files without extensions on a page? [closed] - html

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Why is it wrong to remove file extensions from files and html code, like this:
<link href="cs" rel="stylesheet">
<script src="j"></script>
<img src="1">
Why does nobody do that? Will this cause any browser compatibility issues or penalties from search engines?

Well, for one, you'd better make sure all your filenames are unique, as your code can't tell the difference between main.css and main.js...

The src and href attributes (among with virtually everything else on the web) uses URLs, not "files". URLs don't have file extensions. It's just a convention that .XXX is used in a URL, but it has no inherent meaning. As such, using meaningless one-letter URLs works just fine, yes. But there's no inherent advantage to it either, it just makes your source code and URLs less readable, even for yourself.

Related

Is base tag really necessary for relative URLs? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I'm using relative URLs for my websites (href="/something/"), and it works perfect. I recently discovered the <base> tag. Should I be using it? What could go wrong if I don't use it? At the moment, it seems web browsers can solve the domain perfectly without this tag. Even web crawlers can solve the absolute path perfectly...
Will it be a deprecated tag soon?
If you don't have a <base> element, the browser will use the current address to resolve relative URIs.
If you do supply a <base> element, you basically tell the browser to use the uri you supplied instead of the browsers address.
So you don't need it normally, unless you want to tell the browser to use a different base than the current address.

What is the right way to create url and filename for human readable url? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
Question is not about how to get example.com/?abcd into example.com/blog/post.
Suppose you need a file to be served at example.com/blog/post
(yes) Is it possible to serve html file with name post and get a properly rendered html page at /post?
If it is not possible then file should be called post.html, in that case should the href point to /post.html or /post given that in the end user should see only /post
Adding '.html' at the end is neither harmful nor beneficial.
Adding '.html':
The browser knows how to render and there is less discrepancy.
The pages are easily identified.
It has been like this for quite some time so a lot of websites use this.
Not adding '.html':
More readable and user-friendly url.
It gives a directory like view which is easier to maintain for large websites.
Shorter urls usually get to higher search results.
At the end it's your choice.

Is it bad practice to include the <head> in a partial page [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
If I include the <head> of my page in a external file and then include it using a template engine like FreeMarker, would it be a bad practice?
I'm making a master page using Freemarker and I'm putting all the repetitive content in a external file.
Then I include them using Freemarker directives like such:
<#include "seccionesMasterPage/head.jsp"/>
I made external files of:
menu
header
footer
If I made a external file of the head and then include it, would it be a bad pratice?
Well, including files make things much more convenient, you don't need to rewrite the sample code segments many times, and many frameworks also provide the extend function to let you make some different from the included file. I cannot think of any disadvantages.
From an HTML perspective, it's best to include with every page you make. Since the tag tends to be consistently the same across pages with links to the same CSS stylesheets, jQuery libraries, Javascript files, metadata etc. etc. it's definitely easier to have one external file to change than to have to dig through multiple HTML files all to change one thing.

the mystery of lesscss [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Hi I am trying to work out if it is worth using LESSCSS.
After much research and playing I see that it is not supported by older browsers and needs to be compiled before it is used. Is it even worth using? I know that it makes css easier write, but is it even worth it if what you are writing is not what will be on live when it is used?
Thanks
In fact, there are two ways of using LESSCSS :
Client-side : the .less file is sent to client and is executed by the browser, uses javascript and requires recent browser.
Server-side : the .less files are compiled to plain .css files, which are sent to the client.
The second one requires more configuration of the server, but requires nothing more than CSS compatibility from the client.
You can find more details on the LESSCSS main page, at the bottom of "usage" section : here.

Are you familiar with <ins> tag in html? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I just found that google uses this tag for adsense,
but seems it also works without this tag,why they prefer to use it?
The <ins> tag is used to indicate content that is inserted into a page and indicates changes to a document. According to the HTML spec this was intended primarily for use in marking up versioning of a document.
Clients that aware of this tag may choose to display content inside this tag differently or not at all depending on what they are designed to do. This is very much semantic HTML
As for why Google decide to use it I couldn't say
INS is semantic tag describing something that is inserted to the text after the text was already published. It is not a big deal, it is I guess used by their robots to understand something they care about.
Adding semantics to markup allows tools to extract more meta data from them. Google is in the business of writing such tools, so has good reason to encourage the use of code that they can use.