Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8090317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:40:39+00:00 2026-06-05T19:40:39+00:00

I am using this bit of code successfully: $(window).bind(‘resize’,function() { window.location.href = window.location.href; });

  • 0

I am using this bit of code successfully:

$(window).bind('resize',function() {
    window.location.href = window.location.href;
});

But my problem is, I only want to reload / refresh the window when scaling between 320px and 480px. If I resize between 480px and 960px for example, I do not need the window to reload, so I need to find a way to restrict this to <= 480px I guess.

Any help would be greatly appreciated.

Thanks,

EDIT BELOW

In response to Kolink:

Okay, so I sort of got it working using this:

$(window).bind('resize',function() {

    var winWidth = $(window).width();

    if (winWidth < 480) {

        window.location.href = window.location.href;

    } 
    else {
        // nothing
    }

});

Problem is now, it is constantly reloading on the iphone. If I go from portrait to landscape on the iphone, it just keeps reloading over and over again. Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:40:40+00:00Added an answer on June 5, 2026 at 7:40 pm

    Just use a simple if statement, checking the size of the window and only reloading if necessary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using this jquery code: <a href=javascript:void(0) id=m1>Get Selected id's</a> jQuery(#m1).click( function() { var s;
I have a costume class called Region and I am using this bit of
Currently I'm using this minor bit of javascript to remove a small list of
I'm a bit stuck on this - I am using a Wordpress shortcode with
Using this code to zip a folder and it works perfect on small files
I've successfully implemented a bit of code that strips all HTML from a pasted
So this might sound a bit odd, but essentially I'm trying to render a
I have this bit of code which uses SendInput to send a key press
getting a bit confused over this problem... I have an administrative part of my
Using this file as source, I have a situation where I need to retrieve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.