Reputation: 7631
I have a strange situation. For a web page written using html, jquery and css, on the same browser but in 2 different tabs, I am getting different renderings of the page.
Case 1: Loading the html file directly from the file system: In this case the code renders correctly. This code uses $window.width() which returns 2273. The code also uses setTimeout() and $timeout to perform certain jQuery operations after the DOM is loaded
Case 2: Serving the html/images/css from a django site (locally hosted): In this case $window.width() comes out to be 2067. Some of the jQuery portions don't work well. All images and the overall page is "bigger" in size.
Same browser (Chrome) different tabs.
Any clues?
Upvotes: 2
Views: 168
Reputation: 46619
If text and images look bigger on one page than on another, while they shouldn't, the zoom factor is the first thing you should check.
It's easy to quickly zoom in or out a bit with the keyboard, and then to forget about it, but Chrome has per-page zoom settings, so that when you revisit a page that you once zoomed in on, it will use the same zoom factor again.
And of course, to a browser a page at file:///var/www/file.html
is not the same page as the one at http://localhost/file.html
, even if you know they are.
Upvotes: 1