why could my website be 'loading' twice?

删除回忆录丶 提交于 2019-11-29 22:39:36

问题


or at least that's what pingdom says, and i think it's a pretty reliable service,

Notes:

  1. APACHE: php & mysql
  2. No iframes
  3. htaccess:

    #Gzip
    <ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x- javascript application/javascript
    </ifmodule>
    #End Gzip
    
    
    # 480 weeks
    <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|css|swf)$">
    Header set Cache-Control "max-age=290304000, public"
    </FilesMatch>
    
    # 1 weeks
    <FilesMatch "\.(js)$">
    Header set Cache-Control "max-age=604800, public"
    </FilesMatch>
    
    RewriteEngine On
    
    
    ErrorDocument 500 /oohps.php
    ErrorDocument 404 /where.php
    
    
    RewriteCond %{HTTP_HOST} ^www.keepyourlinks.com [NC]
    RewriteRule ^(.*)$ http://keepyourlinks.com/$1 [L,R=301]
    
    RewriteCond %{HTTP_HOST} ^www.keepyourlinks.byethost32.com [NC]
    RewriteRule ^(.*)$ http://keepyourlinks.com/$1 [L,R=301]
    
    RewriteCond %{HTTP_HOST} ^keepyourlinks.byethost32.com [NC]
    RewriteRule ^(.*)$ http://keepyourlinks.com/$1 [L,R=301]
    
    RewriteCond %{HTTP_HOST} ^keepyourlinks.com/pre/ [NC]
    RewriteRule ^(.*)$ http://keepyourlinks.com/$1 [L,R=301]
    
    RewriteCond %{HTTP_HOST} ^piscolabis.info$
    RewriteCond %{REQUEST_URI} ^/keepyourlinks.com [NC]
    RewriteRule ^(.*)$ http://keepyourlinks.com/$1 [L,R=301]
    
    
    #Webs Sueltas
    
    RewriteRule ^facebook-likes$ fbmate.html
    RewriteRule ^api_webmasters$ API.php
    
    
    
    #Options +FollowSymLinks
    
    
    
    RewriteBase /
    
    RewriteRule ^keep/(.+)/(.+) link1.php?id=$1
    RewriteRule ^article/(.+)/(.+) ?tipo=questions&que=view&id=$1
    RewriteRule ^file/(.+)/(.+) ?tipo=files&que=view&id=$1
    RewriteRule ^user/(.+)/(.+) ?que=usuario&id=$1
    
    RewriteRule ^categories/(.+)/(.+) listarenlaces.php?id=$1
    

I am just looking for possible causes


回答1:


Has nothing to do with your .htaccess

Perused your site code. You've got this little bit in your "Last Activity" section:

<img src="http://keepyourlinks.com/" width="30" height="30"/>

... you're loading your whole page again in an image tag.

More context, to help you find where it's being generated:

<div class="comentario">
    <a href="http://keepyourlinks.com/user/736/laroma">
        <img src="http://keepyourlinks.com/" width="30" height="30"/> laroma
    </a>
    <span class="suave"> ha comentado </span>
    <a href="http://keepyourlinks.com/keep/186577/deshidratacion">deshidratacion</a>
    <span class="fecha"> 72 dias:</span>
    <p>
        La deshidratación es la pérdida excesiva de agua respecto al agua que se ingiere. El European Hydration Institute (EHI) es una fundación creada con el fin de avanzar y profundizar en el conocimiento acerca de la hidratación humana y sus efectos sobre la salud, el bienestar y el rendimiento físico y cognitivo.
    </p>
</div>



回答2:


This is old, but I just had a similar problem. The issue was with the css in a div's class. I had a background:url(); as a placeholder (intending to supply an image later) but forgot about it.

With a blank background url, the page loading twice issue occurs with FF19. I noticed the issue using LiveHTTPheaders. Haven't tested with other browsers/versions. Removing it fixes the issue. Adding it back reintroduces the issue repeatably.




回答3:


Just want to share my situation with the same problem.

I had forgotten line of code, which created div element with inline style for background image and it used undefined variable:

style="background-image: url( <?php echo $image_url ?>)"

This printed error message into style instead of url and that element loaded my page second time, so views counters increased by 2 each time. Found it accidently when fixed other stuff.



来源:https://stackoverflow.com/questions/9783445/why-could-my-website-be-loading-twice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!