My website doesn't work well

Every time I try to log in, it doesn’t go to my index.html

URL = mcubevideo.epizy.com

sometimes it works but it’s like the server goes down all the time, the page turns white when I use adblock, when I don’t use it, I’m redirected to another page outside my web site.
it’s happening often, help me!!!

Hi
please rename browse.html to index.html
but before that remove this script code from the source of browse.html

 <sc​ript type="text/javascript">
  var screenWidth = screen.width; //variavel que contem a largura da tela em pixels
  if (screenWidth > 800) { //se a largura da tela for maior que 800px redireciona para versao desktop
  window.location.href = "https://google.com";
  } else { //se nao, nao redireciona
 //nothing
  }
  </sc​ript>
3 Likes

It don’t works! it’s like I’m on another site but with my domain

I tested and it works (Brooklyn 99)

At what resolution are you testing it ?
The JS code you have redirects to Google unless it is less than 800
I don’t even know what is the purpose of it (delete it).

Delete browser cache, try incognito / private mode or try another browser.

Or your problem is (still) this:
https://infinityfree.net/support/why-doesnt-my-domain-work/

3 Likes

I used to translate their JS //comments and i saw this:

if screen width greater than 800px redirects to desktop version

@sleep_br
Please Temporary remove this command until you make the Desktop version.

Also Can you please explain where do you redirect while visiting your site? (if it isn’t google)

If it is Google do my solution. Otherwise take look at above post :slight_smile:

3 Likes

I don’t need to read the comments inside the code because I understand what is doing… that’s why I wrote this

but I wonder what is the purpose of redirecting to Google ? :thinking:
it only creates confusion and makes it difficult to debug

3 Likes

Maybe brand new Desktop version of their site :thinking:

Like we both said. They might remove this code or this problem will continue.

2 Likes

Maybe he got the script from other people (tutorial, etc.), about redirect mobile version site to desktop version site.
But he forgot to edit the example URL (in his case: Google URL).

3 Likes

it would be better for him to use CSS and the standard way to break the content depending on the resolution

2 Likes

I am doing a desktop and mobile version for the site. That’s why I use this code.
This is for google because I was just testing.

I don’t know what was going on, but probably something was bugging, I did what you told me and it worked, then I used the same code and it’s working now.
I’m making some improvements to the code, but thanks for your help, thanks

you helped me a lot, all of you
thx

1 Like

I know about using breakpoints, but I’m doing a separate site for better adaptation.
a lighter site, lower resolution images like Youtube and mYoutube.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.