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

  • SEARCH
  • Home
  • 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 8156625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:00:44+00:00 2026-06-06T17:00:44+00:00

Possible Duplicate: Mobile site – force landscape only / no auto-rotate I have seen

  • 0

Possible Duplicate:
Mobile site – force landscape only / no auto-rotate

I have seen a few posts about this but not really found a definitive answer, rather a few suggested workarounds.

Is it possible to force the device orientation via a webpage? I.e: can I ‘jam’ my site as landscape?

Thanks very much

  • 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-06T17:00:46+00:00Added an answer on June 6, 2026 at 5:00 pm

    You can with JavaScript. First check if it is supported:

    if (window.DeviceOrientationEvent) {
        console.log("DeviceOrientation is supported");
    }
    

    Then add eventListener if you want to do something on rotation:

    window.addEventListener('deviceorientation', function(eventData) {});
    

    I guess you should trigger your side to respond when it is turned. You can’t trigger the orientation, because the device does that. So when your website loads in landscape mode, you should detect it and render the site in Landscape-mode (load a custom css?) and then when the visitor turns his phone or tablet the listener can re-render your site with a new CSS file through JavaScript (jQuery advised for these situations).

    What you can also do it the site hasn’t much dynamics in it, you can just re-load the page with GET method call to change the orientation, but off course this can be a slower option. Re-rendering a whole website with JavaScript on a mobile device very often can even heat up the phone for what I tested before on my iPhone. The JavaScript engine is fast and pulls out much CPU to render everything smoothly, but also eats many resources in a short time, making it hard for a mobile device to constantly keep the renderings up. Best example for this is when making a HTML5 game with JavaScript calls. An iPhone can eventually heat up like playing a game in an actually App :P.

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

Sidebar

Related Questions

Possible Duplicate: Dynamically adding collapsible elements I've seen a few posts on this but
Possible Duplicate: Developing cross platform mobile application I have been tasked with looking into
Possible Duplicate: regex for URL including query string I have a text or message.
Possible Duplicate: Event handlers inside a Javascript loop - need a closure? I have
Possible Duplicate: Import XML to SQL using C# I just downloaded about 3000 XML
Possible Duplicate: Extracting dollar amounts from existing sql data? I have a column in
Possible Duplicate: Switching back and forth between mobile and standard views with css /
Possible Duplicate: Horizontally scrollable image on Android + PhoneGap + jQuery Mobile how to
Possible Duplicate: Monotouch or Titanium for rapid application development on IPhone? I have an
Possible Duplicate: JQuery validate e-mail address regex hi i have an input filed in

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.