X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

Calling images on website two times

Posted

Hi, When I am calling the images of the contents in the website which is developped by PHP, there is no problem to display them. But i check the Access Logs of site, Only Firefox GETs the page TWO times. Other browsers GET the page for one time, but Firefox GETs two times.

Image URL like this : http://www.mysite.com/image/name-of-the-image.jpg (With htaccess rewrite, to an image.php PHP file)

in image.php file , Image Magick (Php Image Library) prints the image..

Internet explorer, chrome, opera vs. is normal. Firefox gets two times on Access Log...

What is the solution of this problem, i couldn't find a solution...

Additional System Details

Installed Plug-ins

  • Shockwave Flash 11.6 r602
  • Next Generation Java Plug-in 10.13.2 for Mozilla browsers
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • Shockwave Flash 11.5 r502
  • Google Update
  • Adobe PDF Plug-In For Firefox and Netscape 11.0.01
  • A plugin to detect whether the Adobe Application Manager is installed on this machine.
  • GEPlugin
  • 4.1.10329.0
  • Unity Player 3.5.1f2
  • Picasa plugin
  • NPWLPG
  • The plug-in allows you to open and edit files using Microsoft Office applications
  • Office Authorization plug-in for NPAPI browsers

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0

More Information

David Tenser
  • Administrator
  • Moderator
32 solutions 294 answers

I really can't help you with this one -- this sounds like a developer question. Your best bet is probably to join the mailing list for developer discussions at https://lists.mozilla.org/listinfo/dev-apps-firefox.

Cheers, David

Question owner

Thanks David, Yes it was a problem for development. I made the headers but still not worked. Then i tried different header, now problem solved... may be needed in the future, the correct header codes like this:

// Last Modified date for caching $file_last_modified = filemtime($filename);

// Expires in two months $expires = time() + (60 * 24 * 60 * 60);

header("Pragma: public"); header("Content-type: image/jpeg"); header("Expires: " . gmdate("D, d M Y H:i:s", $expires) . " GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s", $file_last_modified) . " GMT");

Thanks