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
<script 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
}
</script>
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.
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).
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
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.