Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Images are not loading from initial domain when using a cdn

  • 6 trả lời
  • 3 gặp vấn đề này
  • 29 lượt xem
  • Trả lời mới nhất được viết bởi pixecs

more options

Hello, i have a wordpress website on which i set the w3 total cache plugin with a cdn, the cdn is MaxCDN and is configured to not serve images but only css & js & font files. Because i configured the cdn not to serve images, the images in css files have the src as absolute path, path which point to original website domain, something like this: background-image: url("http://www.originaldomain.com/images/back.jpg");, the css file is served from the cdn like this: http://cdn.originaldomain.com/css/style.css . So the problem is that firefox refuse to load the images referred in style.css file, images which probably appear to be in another domain. If i try to load the images directly in browser, using address bar, they are loading ok, but on loading from css file i got a http error 500 (acording to firebug). The same website is loading ok in other browsers: ie7/ie8/ie9, opera, safari and chrome. Can anyone help me to solve the issue?

Hello, i have a wordpress website on which i set the w3 total cache plugin with a cdn, the cdn is MaxCDN and is configured to not serve images but only css & js & font files. Because i configured the cdn not to serve images, the images in css files have the src as absolute path, path which point to original website domain, something like this: background-image: url("http://www.originaldomain.com/images/back.jpg");, the css file is served from the cdn like this: http://cdn.originaldomain.com/css/style.css . So the problem is that firefox refuse to load the images referred in style.css file, images which probably appear to be in another domain. If i try to load the images directly in browser, using address bar, they are loading ok, but on loading from css file i got a http error 500 (acording to firebug). The same website is loading ok in other browsers: ie7/ie8/ie9, opera, safari and chrome. Can anyone help me to solve the issue?

Giải pháp được chọn

I finally managed to fix the issue: the problem was a rewrite rule on .htaccess which redirected the request to a nonexistent file when the referer was not in the white list. The thing which pointed me on the wrong direction was the fact that other browsers happily displayed the images, probably by sending as referer the original domain name, not the cdn domain name, and so the rule was never kicking in for them. Thank you for support.

Đọc câu trả lời này trong ngữ cảnh 👍 1

Tất cả các câu trả lời (6)

more options

Disable W3cache for Admin and check it out...

Reload the webpage while bypassing the cache using one of the following steps:

  • Hold down the Shift key and click the Reload button with a left click.

OR

  • Press Ctrl + F5 or Ctrl + Shift + R (Windows and Linux)
  • Press Command + Shift + R (Mac)

Let us know if this solves the issues you are having.

more options

Hello, i already have a exception in w3 cache plugin for admin users (to bypass the cdn and use all files from original domain) so no problem there, the problem appear only for anonymous users, users which get the css files from cdn and the images should be loaded from original domain. Also i already tried the full page reload with no avail. The problem manifest only when the cdn is active and cdn is configured to not store website images, and appear to be something similar to same origin policy from javascript, i say this because checking in firebug i saw that the images which have as referer the cnd domain are not displayed. Thank you.

more options

Try Firefox Safe Mode to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.

(If you're not using it, switch to the Default theme.)

  • You can open Firefox 4.0+ in Safe Mode by holding the Shift key when you open the Firefox desktop or Start menu shortcut.
  • Or open the Help menu and click on the Restart with Add-ons Disabled... menu item while Firefox is running.

Once you get the pop-up, just select "'Start in Safe Mode"

If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to figure out which one. Please follow the Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems article for that.

To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.

When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.

Thank you.

more options

Hello, the problem is still present in safe mode. I also tried on 2 openSUSE 11.4 installs with Firefox 19 and the behaviour is the same - the images from original domain are not loaded when the css file is provided by cdn.

more options

You can check the Net log in the Web Console (Firefox/Tools > Web Developer;Ctrl+Shift+K).

more options

Giải pháp được chọn

I finally managed to fix the issue: the problem was a rewrite rule on .htaccess which redirected the request to a nonexistent file when the referer was not in the white list. The thing which pointed me on the wrong direction was the fact that other browsers happily displayed the images, probably by sending as referer the original domain name, not the cdn domain name, and so the rule was never kicking in for them. Thank you for support.

Được chỉnh sửa bởi pixecs vào