Strange freezes and loading problems for the website. (Godaddy)

BuyTack.com

In the past few weeks, I have come back and refilled my site. It was provided to me by a friend, and I made some minor changes to keep it somewhat old looking with higher resolution and cleared the HTML5 code.

My problem lately is that I'm going to optimize SEO and improve user experience by including compression on my site, loading time and moving some code around which many websites recommend.

Javascript in front of the closing body tag, css in the head, compressed photo using Photoshop.

Now the problem, since I recently modified and edited my .htaccess file to allow compression, is that constantly updating or sequentially using the search bar leads to extreme freezes (20 or more times), and then the page loads or the image is missing (before another update) or one of the scripts that take too long to complete.

To give additional information:

  • csSearchPro was created in Perl a long time ago. He did this job recently, until I started messing with compression and all the other JS fragments that I added to the site.

  • HTML5Shiv was added for IE 7/8, as they are still some of the ultimate browser: user ratio.

Question What could be the reason for a site freezing after compression than it was before compression? Why does the search / image panel act weirdly when a page loads several times?

If you need more information, please ask.

Thanks.

+4
source share
1 answer

The entire server responds slowly by checking your .htaccess and permissions. You should also group your scripts and style sheets, for example:

<!-- CSS --> <link rel="stylesheet" href="/css/one.css" /> <link rel="stylesheet" href="/css/two.css" /> <!-- JS --> <script type="text/javascript" src="/js/one.js"></script> <script type="text/javascript" src="/js/two.js"></script> 

This will allow them to load asynchronously, i.e. all stylesheets will be loaded immediately, and then all scripts at once. I usually do jQuery in the header so that I can use it in a line, and then the rest of the scripts combined into one file (if possible, each of them in the document handlers is ready, you will not have a problem with the variable) on the footer.

+2
source

Source: https://habr.com/ru/post/1435278/


All Articles