What could be causing my HTML website to load slowly and freeze when I switch to another program?

I am in the process of creating three websites. Two of them are functioning perfectly fine, but I am encountering a speed issue with the third one. Sometimes it loads slowly initially, but if I wait a bit longer, it eventually loads and works well. However, if I switch to another tab while waiting for it to load, the entire site freezes. What could potentially be causing this problem?

body {
  font-family: sans-serif;
  background: url(wallpaper.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.fading {
  background-image: url('fatyol.png');
  width: 880px;
  margin: auto;
  margin-top: 50px;
  margin-bottom: 50px;
  border-top-left-radius: 50px;
  border-bottom-right-radius: 50px;
  text-align: center;
}

#cim {
  font-family: sans-serif;
  text-decoration: underline;
  font-size: 30px;
}

#nav {
  font-family: sans-serif;
}

.kep {
  width: 800px;
  height: 500px;
  margin-left: 50px;
  ...
<!DOCTYPE html>
<html lang="hu">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e684889892959394878095b0d7ccd3ccd5">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT...
          <li class="nav-item">
            <a class="nav-link" href="site2.html">Második nap</a>
          </li>
        </ul>
      </div>
    </div>
  </nav>
  <div class="fading">
    <header class="fejlec">
      <h1>Első nap</h1>
    </header>
    <div class="row">
      <div class="col-md">
        <img src="SiofokViztorony.jpg" alt="Víztorony" class="hajokep">
      </div>
      <div class="col-md-6">
        <img src="szallas.jpg" alt="Szállás" class="hajokep">
      </div>
    </div>
    <p>Késő reggel, 9:30 körül indultunk el a vonatállomásról, nekivágva egy 2 és fél órás egy helyben utazásnak Siófokra.</p>
    <p>A vonatról leszállva negyed órás séta mellett keresztül vágtunk Siófok Fő terén, melynek közepén egy hatalmas víztorony áll, amely 2022 őszén lett felújítva. Jelenleg kil&a...
        ...
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e0828f8f949394928190a0d5ced1ced3">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP...

After carefully reviewing the entire code base, I couldn't pinpoint any specific reason that might be causing this performance issue.

Answer №1

To optimize your website's loading speed, consider compressing images to reduce their file size.

Additionally, adjust the dimensions of images based on the screen size they will be displayed on. This can help save space and improve loading times.

Reducing image quality to 60-70% can also be effective in saving space without sacrificing too much display quality. For instance, a large image with a resolution of 4032x3024 pixels can be compressed using tools like Gimp or Photoshop to significantly reduce its file size from 2-5 Mb to around 658kb or less.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Can the input field offer guidance on its own?

While browsing, I came across an HTML5 checkout form that grabbed my attention. You can view the source here I decided to make some changes to the form and discovered that entering an incorrect email address triggers helpful tips. Strangely, upon closer ...

Steps to assign the identifier as the current index in the v-for iteration

Struggling to assign the id based on the index of a v-for loop. I attempted: <li v-for="(item, index) in items" v-bind:key="item.id"> <p>{{item.name}}</p> <input id= {{index}} type= "number"> < ...

The Bootstrap navbar-fixed-top is failing to function properly within the confines of my "content" div

My goal is to utilize the bootstrap navbar-fixed-top within my id="content" div. However, when I apply the navbar-fixed-top class like this: <nav class="navbar navbar-default navbar-fixed-top navbar-shadow"> The navbar ends up on top of everything ...

What is the best way to ensure that the size of a header is balanced on both margins?

I just recently began learning CSS about a week and a half ago, and I'm facing a challenge that I'm struggling to overcome. I want my webpage to have the same design as shown in this image, but despite trying various solutions, I can't seem ...

What could be the reason for the fluctuating HTML output?

Exploring the world of CSS and HTML, I noticed a curious change in the output when text is added inside a div tag. First: div.bar { display: inline-block; width: 20px; height: 75px; /* We'll override height later */ background-co ...

Turn off Chrome 69's autofill functionality

I've recently encountered an issue with Chrome's password autofill feature that has been troubling me for a few days now. This problem began when I was using Chrome version 69. After much trial and error, I found a solution by removing the id an ...

Using CSS transition on the height property does not produce the desired effect

I'm currently working on a menu interaction that activates on click. Here is the code snippet for reference: let btn = document.querySelector('.trigger'); let icons = document.querySelector('.icons'); let labels = document.query ...

Infinite scrolling feature on Kendo UI mobile listview showcasing a single item at a time

Currently, I am utilizing the kendo ui mobile listview and encountering an issue when setting endlessScroll or loadMore to true. The problem arises as the listview only displays the first item in such instances. Upon inspecting with Chrome inspector, I ob ...

Why am I receiving a "Cannot read property 'style' of undefined" error when using the Nanoscroller?

This is the code snippet I've been working on: <ul id="selectProfileOptions_IC" class="dropdownToggle_cont" ></ul> Under this ul element, I have listed some names. To enable scrolling functionality, I employed nanascroller in my project ...

Tracking a user's path while redirecting them through various pages

Recently, I created a website with a login page and a home page using nodejs, javascript, and html. The client side sends the entered username and password to the server, which then replies based on the validation result. During navigation between pages, h ...

Convert HTML tr elements into a PHP array

After realizing that my previous thread lacked clarity, I decided to delete it and start fresh. In my php script, I send a cURL request to a website which generates an HTML table. This table contains 7 TR elements, each containing 6 TD elements. Essentia ...

What could be causing Outlook to remove the color from my email buttons?

Is there a way to change the button colors in an email template successfully without them reverting back to white? I've encountered this issue when trying to use different colors (red, green, blue) in Outlook. I find this issue quite frustrating, so ...

Is there a way for me to determine when my web browser has completed loading the entire page?

Similar Question: How to Detect When a WebBrowser Has Finished Loading a Page Is there a way to determine if my web browser has completed loading all content on the page? In C#, is it possible to display multiple pages in sequence without allowing na ...

Fuzzy division following a CSS transformation/animation

I have been working on a content slider, using the guidelines from this demonstration However, I have encountered an issue where my content, which consists of a few divs, appears slightly blurry after the CSS transition completes. This problem only seems ...

Why isn't my Jquery click event able to download the csv file?

Initially, I was able to export a csv file using the html onclick element. However, when I switched to a jquery click event, the functionality stopped working. I don't understand why, as I believe the same function is being called. The Export.Expor ...

Is your custom login form in Web2py not submitting properly?

My attempt to customize the login form for web2py has hit a roadblock. Despite adding the necessary fields and submit button, nothing seems to be happening. Here's what the code in the form's view looks like: {{include 'web2py_ajax.html&apo ...

AgGrid's magical dropdown feature

Struggling to integrate a bootstrap-4 dropdown menu with AgGrid, I'm facing an issue where the data table overlaps the dropdown when the html is present. Attempts to increase the z-index have not yielded results. Below is the html code snippet: < ...

The Radix UI Theme's dark mode isn't taking effect

I'm having trouble getting the dark mode to work properly in my Radix UI app. Despite setting appearance="dark", nested components like Box and Card remain light. Interestingly, other props such as accent color seem to be working fine. It&a ...

Transforming CSV CSS values with jQuery's CSS method: Step-by-step guide

My goal is to stack multiple background images within a single div container while ensuring their position is relative to the screen height. The problem I'm encountering is my inability to modify CSS values separated by commas. Here is my logical appr ...

"do not make use of inline labels in bootstrap version 4

I'm working on displaying a bootstrap 4 label for a dropdown hyperlink next to some text. Here is the HTML code I have: <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <img src="http://exampl ...