Site locking on specific pages

Asked

Viewed 506 times

1

I have few functions on this site, but I believe some jQuery is doing the following page curb.

The scripts are basically:

    <script>
    $(document).ready(function () {
        $('.contato').hide();
    });

    function mostrar(contato) {
        $('#' + contato).slideToggle();
    }
</script>


<script>
var num = 50; // tanto de scroll que vai precisar para a barra ficar fixa.
$('.navbar-fixed-top').css('top', 150);
$('.ajusteMenu').css('margin-top', 55)
$(window).bind('scroll', function () {
    if ($(window).scrollTop() > num) {
        $('.navbar-fixed-top').css('top', 20);
    } else {
        //Quando o menu ficar fixo
        $('.navbar-fixed-top').css('top', 150);
    }
});
</script>

What might be generating this locking? Even inspecting element takes time to open.

  • You have the website link?

  • @Moisesgama is there under the link "page". But to make it easier: http://www.congressoconsulfarma.com/Web/cursos/09

3 answers

5

Really your site is underdeveloped, missing open and close tags, put things in the right places and the error has nothing to do with jquery, has to do with good development practices that you are not following.

I rated your site with this amazing google tool (Pagespeed Insights) , from 0 to 100, the google of note 9 (mobile) and 11 (desktop) for this page in question, you put the link there, this is horrible for the user because it spends a lot of internet band it.

Do some basic things:

  1. Place scripts and jquerys at the bottom of the page before .
  2. Use as few jquery scripts as possible, or put them all in one minified file and include them in the page.
  3. Compress your scripts and if possible html.
  4. Work the images, they’re too heavy.
  5. see with F12 the things that are missing on the page, this delays the loading of the site,since until he sees that there are no, he keeps calling them, like None.js, icon and more things on your page.

PageSpeed Insights

You call 02 times the same scripts and none is .min calls all without compaction, this is not good, note that bootstrap.js is called 02 times, only on this page.

<script src="/Content/js/jquery-1.10.2.js"></script>
<script src="/Content/js/bootstrap.js"></script>
<link href="/Content/css/bootstrap.css" rel="stylesheet" />
<link href="/Content/css/business-casual.css" rel="stylesheet" />
<link href="/Content/css/quadradoCursos.css" rel="stylesheet" />
<link href="/Content/css/theme.css" rel="stylesheet" />
<link href="/Content/css/style.css" rel="stylesheet" />
<link href="/Content/css/socialIcons.css" rel="stylesheet" />
<link href="/Content/css/palestrantes.css" rel="stylesheet" />
<link href="/Content/js/bootstrap.js" rel="stylesheet" />

Please review all the code and open and close the tags correctly, use files. min of jquery and bootstrap and further explore the potential of bootstrap that will leave your site light and with excellent usability!

  • 1

    don’t need to hit the boy so much. I was going to answer but your answer is great, just forgot to mention the semantics of the code, the tag body and html were not opened, the footer are outside the closure of body (I don’t even know why it’s closing if it’s not opening where it’s supposed to) and everything else. If you were to validate in W3C jessuis.

  • 1

    @Moisesgama sorry, I think I was heavy, I didn’t mean to upset anyone, but the people who develop get passion for the thing, that gives anger (the code and not the person) when we see something like this.

  • I know how it is I am the same, but apparently he is starting and being discouraged is very bad. But I understand how it feels. Abs.

  • @Moisesgama you are right, I will edit for reply!

  • I didn’t know this tool Google I’ll even add in bookmarks :)

  • 1

    @Maiconcarraro She is so F0d4 that even gives you the compressed files to use if you think necessary, I do not see myself without this tool kkkkk and has an extension of her for Chrome tbm that does the same tramp and has the same name.

  • 1

    I appreciate everyone’s criticism. No, I’m not starting and this application is not mine, I’m giving maintenance.

Show 2 more comments

3

Paulo Roberto’s answer is impeccable; you must give +1, accept it and follow her advice.

Having said that, part of the problem (which Pagespeed Insights can’t get because it doesn’t do OCR) is that you’re using images to represent what is fundamentally text. You should strongly consider the possibility of putting these images as text on the page: thus you reduce the size of your page and do not need to repeat the content of the image on alt="…" just so Google can index you.

If your client wants a cute font on each course banner, you can use a Webfont - Typekit, Fonts.com have several options at affordable prices, and if the customer does not release the amount, you can choose a source from Google Web Fonts.

0


Despite all valid comments regarding the way the site was developed, the problem was not this.

The site had undergone an SQL Injection.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.