General presentation of HTML page

Hello

Two very simple questions about the way that you layout a page "general" (html or php)

1. in terms of links "script" at the top of the page like this.

"< script src="scripts/jquery-1.7.2.min.js "type =" text/javascript"> < / script >

     <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

Did you put all the links that you usually use at the top of each page, even if you can't use them on this page?

(If you do not have to worry about "did I put that point up there?")

2. where do you put the javascript scripts?

I saw them put ALL of the head, the upper body to the lower body.

I read somewhere that ' all javascripts should be placed above the < / body > line.

Is there a consensus on these two issues?

Thanks in advance.

If you do not use a script, it is best not to include in the page. However, if it is a script like jQuery you use on many pages, there is probably little wrong in adding because the script will be cached by the browser, so it does not need to be downloaded again.

For a long time, councils were to put all the JavaScript links in theof a page. However, the consensus has shifted because JavaScript blocks other activity of browser. Everything stops while the browser waits for the script to download and be analyzed. With a lot of scripts, this happens so fast that it makes very little difference. However, anything that slows down the page loading should be avoided.

Why jQuery and similar scripts are now commonly placed just before the closing tag is because they must wait until the ISP (DOM, the Document Object Model) has been loaded before that they can manipulate elements on the page. In some cases, however, the JavaScript code is necessary prior to the loading of the page. For example, the HTML5 shiv must be in theof the page. Otherwise, IE 8 and older does not apply your styles of new HTML5 elements. In addition, mobile jQuery scripts must be loaded before theof the page.

In short, it depends on what the script is intended. If she will not be executed until the DOM has been loaded, put it before the closingtag. If she fills a function at an earlier stage, put it in theor in the appropriate location in theof the page.

Tags: Dreamweaver

Similar Questions

  • Here's a strange. I have a HTML page with this time a wmv video. It works perfectly from a USB stick or SD card, but does not work when they are copied to the hard drive

    I have an HTML page created with web expression 4. It contains only a wmv video. It works perfectly when it is called from a USB stick or SD card, but does not work when they are copied to the hard drive. The results are the same with IE and Firefox. It don't make no difference if I use Media Player V9 or V11. He has no control on the page Media Player. Video and html files are in the same directory. Here is the code snippet:

    LIFT, DRAG, THRUST and GRAVITY










    If I run it on a machine with Win 7 there is no problem.

    Richard Grosser

    Hi Richard c. Grosser,.

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Microsoft Expression forums.

    http://social.expression.Microsoft.com/forums/en-us/categories

  • Fix the Power Point presentation on web page (was: Power Point)

    How you attach a PowerPoint presentation to your Web site?

    Well, you don't really have. PowerPoint can export a presentation to HTML, and if you only have export to a folder in the root of your local site you can then download this file and place a link to the index.html file created by PP on any page of the site.

  • Using SSI with html page

    I have several html pages I made use of SSI. The code would go like:

    <div class="footer">
         <!--#include file="../ssi/footer.html" -->
          <div class="clr"></div>
    

    But when I preview the page on the server, it does not show the code. If I bypass the SSI and paste the HTML directly that he presented.

    I'm sure that the path is correct.  I can browse it and I also tried to put in the entire url just in case Insert of DW messed.

    Insertion of the SSI works very well with the php files, but when I try it in htm files, I can't work.

    Y at - it something I am doing wrong?

    Most of the guests did not analyse the data on .html pages.  Some will if you ask.

    For best results, rename your parent pages (those that contain include statements) with .shtm or .shtml extension.

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • Why can't I save a local HTML page on the new tab page?

    I have an HTML page stored on my hard drive local. I created a bookmark for it; the url begins with "file://". I can easily add any other web page marked with a bookmark to the new tab page, but I can't add my local HTML page. How do I do that?

    Hello, try to do this
    Open your page normal HTML (double click on the file), then copy the address address bar (the path of your daughter), then in the address bar, type "subject: config", press ENTER, yes I'm cautioned (some look like this, sorry I don't have FX in English), in the search bar, type "browser.newtab.url" and the option that is displayed, click with the right button of the mouse and click on change... or double click on the option , change its value to a copy the address (address of your file you copied), click OK and test

    Sorry my bad English!

    Thank you

  • Hindi fonts not rendered in html pages

    Hindi fonts not rendered in html pages are operating except the mangal font and original.
    Is it a bug or a problem which I am not capable of tackling.
    Browser Mozilla reveals an error in the console (font download has failed or the character encoding of the HTML document is not declared. The document will be made with text truncated in some browser configurations if the document contains characters from the US-ASCII range.
    the downloadable fonts: download failed (font family: 'Kruti Dev 010' style: normal weight: normal stretch: normal CBC index: 0): status = 2147500037
    Source: file:///D:/epub/filename/OEBPS/Fonts/k010.otf @ file:///D:/epub/filename/OEBPS/Styles/style.css).

    Please answer soon.
    Thank you.

    1 - is the HTML page to specify the correct encoding, and is the file saved in this encoding? Validate your markup and style sheet in the links below.

    2. the style sheet point to the correct file?

    3. the police is a Unicode font? If so, there may be another problem with the font file. Try to use the following fonts generator to convert it into several formats.

  • Can I make a presentation of a Pages document?

    Is it possible to make a presentation of a Pages document?

    There is not a one click for this solution.

    Copy the text of Pages into individual text boxes in Keynote.

  • PIC of links not working in FF but is in IE8 on HTML page

    Hi, I have an Html page that has a bunch of images of small peak on this subject. When you click on one it displays close-ups in the center of the page. For some reason any they all work well in IE8 but not Firefox only works of bottom line. The law on the rest because they have no mouse link does not change to the symbol hand pick. Normally I never have an issue with FF more often its IE.

    It is because the DIV TABLE with class = "Object336" is coming to overlap this part of the screen.
    You set the height of the table to 405px.
    Remove this attribute height and also remove the three
    in the last BAY contact us

    <DIV class="Object336"><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=860 HEIGHT=405><TR><TD VALIGN="TOP" ALIGN="left"><DIV CLASS="text-align:left;margin-left:0px;text-indent:0px;"><SPAN CLASS="textstyle0"> Please write if you would like to use <br>some of my pictures. I have  many more. <br></SPAN><SPAN CLASS="textstyle1"><A HREF="Page12.html">Contact Us</A></SPAN><SPAN CLASS="textstyle0"><A HREF="Page12.html"></A> for more Info.<br><br><br>
    </SPAN></DIV></TD></TR></TABLE></DIV>
  • How can I see the source code of a html page?

    In previous versions, it was possible to read the source code on an html page in the "View" menu It is no longer there. How to read code now?

    Use one of them:

    • Firefox > Web Developer > Page Source
    • Tools > Web Developer > Source of the Page (Ctrl + U)
    • Right-click on a web page to open the shortcut menu and select the Source of the Page
  • How to put my html page created as home page?

    I created an html page and I want to put it on the home page so that whenever I open firefox it should open. The page I created is html.

    Here's how I did it.

    I saved the page to a folder on my C drive.

    Then in Windows Explorer, I opened the folder and double click on the page to open it in Firefox. (If Firefox is not your default browser, then you can drag the page of Windows Explorer in a Firefox tab to open it.)

    Then I went into the dialog box Options and clicked on the use current Pages button.

    It works for you?

  • Cannot open html page to trident engine

    Our home alarm system is accessible via the internet. Until I've used MS IE there is no problem. Unfortunately Firefox cannot open html pages. Your alarm system producer says that Firefox is not the good browser for that. After searching the Internet I found, that alarm works with the browsers of engine trident (not just from MS). Now the question: any Firefox plug in, or should I to get Firefox? I don't want to buy a new alarm system for US$ 2,000! Help, please! Thank you!

    Well Yes, its there for FF too...

    https://addons.Mozilla.org/en-us/Firefox/addon/IE-tab-2-ff-36/

  • Try calling a WCF service hosted locally by a HTML Page customized using jquery. Error: 451: undefined

    Hello

    I created a WCF Service, customized and hosted locally by using application Console VS.

    I need to access the methods of the custom of a custom Page HTML application, using JQuery.

    I tested the WebService in Wcftestclient.exe and it works very well.

    Now, while trying to access it from the HTML Page (not no matter what Web Application), he runs into function() error of $. ajax()

    State of error: 451

    messageReason Error: Undefined

    Please share your suggesstions how approach when accessing the client HTML Page.

    Hello

    The question you posted would be better suited in the MSDN Forums; We recommend that you post your question in the MSDN Forums to get help:

    http://social.msdn.Microsoft.com/forums/en-us/WCF/threads

    Keep us updated on the status of the issue.

  • How to download the content of the HTML page

    Is it possible to download the content of the HTML page...

    I mean frm application click on webpage link open HTML... Download its contents to a location specific to the BlackBerry.

    How if it is possible?

    And another question... How do I navigate the application in the way...

    ---> text is displayed as link... click goto... another screen to display information about this text...

    Waiting for your kind answers...

    Thnx

    Download html would be using a httpconnection. check the samples that are provided with the jde or use the strength of the research.

    You can catch clicks by navigationclick by replacing or by implementing and adding a fieldchangelistener.

  • Push the access and html page locally

    Hello

    I know how to make an html page.

    If I push a page called "myNews.html" store on a remote server.

    My widget on my index.html page, I have a link to the page "myNews.html".

    My problem is I want to open it locally. I don't want to open it from a remote server.

    It should not be in the cache of the browser?

    An application widget/webworks is a sandbox separate from the actual BlackBerry browser.  He does not share the cache of the browser and therefore would not be able to load in your page that is pushed by a surge in browser or the Web for the signals channel.

  • Integrate HTML page in project?

    I currently have an application that uses a browserfield to access a Web page, but I was wondering if it is possible to integrate the HTML page with the project somehow so that the browserfield appears this page instead of having to pick it up on the web?

    Hello

    I guess this will help you

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=28509

Maybe you are looking for