Jump to content
Sign in to follow this  
Tome9

https:// showing different CSS than http:// on my site

Recommended Posts

Hi all

I'm fine tuning the CSS stylesheets I have for different devices, however when I update the files on my server i'm getting two different outcomes on my https:// site and then http:// version. One is picking up one stylesheet and one another, so they look different on most devices.

In total I have 7 stylesheets, each is changed for the specific device dimensions.

Has anyone any idea why this is happening? I was thinking it was to do with a lag between the files being updated on both protocols.

 

Thanks

Edited by Tome9

Share this post


Link to post
Share on other sites

Sounds like your browser might have cached the other version. How have you set up https in htaccess? If you can access both the https and http versions something is wrong, technically with a www on https there are normally four variants, http://yourdomain.com, http://www.yourdomain.com, https://yourdomain.com, https://www.yourdomain.com. You should be forcing anything not using your preferred setup to the right version, easily done with htaccess (assuming you want to use https://www);

Options +FollowSymlinks
Options -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC]
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R=301,L]

Edit: Forgot to say this would then redirect the non https css file to the real version which I think is the current problem.

Edited by BrowserBugs

Share this post


Link to post
Share on other sites

Do you really need 7 stylesheets?

Reading your other thread and you could easily combine them all into one. Google prefers this.

And if you minimise the file google will like you even more.

But to answer your question, it does seem to be a caching thing.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing

    No registered users viewing this page.

  • Member Statistics

    • Total Members
      59,326
    • Most Online
      4,970

    Newest Member
    veracubano
    Joined
  • Forum Statistics

    • Total Topics
      66,003
    • Total Posts
      454,536
×