Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page
Help Center/ Content Delivery Network/ Troubleshooting/ Why Is the Displayed or Downloaded Content Incorrect After CDN Acceleration Is Used?

Why Is the Displayed or Downloaded Content Incorrect After CDN Acceleration Is Used?

Updated on 2024-06-06 GMT+08:00

Symptom

After CDN acceleration is enabled, when a user accesses a website or app, the displayed or downloaded content is incorrect.

Check Items

  • Cache rules
  • Local cache
  • Whether CDN PoPs still store stale versions of your content
  • Whether the origin server stores different versions of files
  • Whether the content is hijacked

Procedure

  1. Check cache rules.
    1. Cache rules may be incorrect.
      • For dynamic files (such as PHP, JSP, and ASP files), set the cache TTL to 0, so these files are not cached and are pulled from the origin server for each request.
      • For static files (such as JPG and ZIP files) that are not frequently updated, set the cache TTL to more than one month.
      • For static files (such as JS and CSS files) that are frequently updated, set the cache TTL based on service requirements.
    2. The cache rule priority may be incorrect. As a result, the cache rules do not take effect. The priority value ranges from 1 to 100. The larger the value, the higher the priority.

      Assume that you have set a rule with the cache TTL as two days for JPG files.

      As shown in the preceding figure, the first rule indicates that the cache TTL of all files is 30 days, and its priority is 8. The second rule indicates the cache TTL of JPG files is 2 days, and its priority is 2. When a user requests a JPG file, the first rule is matched because its priority is higher. Therefore, the JPG file will be cached on CDN PoPs for 30 days instead of 2 days.

    3. For more cache settings, see Setting the Cache TTL.
  2. Check whether the fault is caused by the local cache.

    Clear the browser cache and request content again to check whether the fault has been solved.

  3. Check whether CDN PoPs still store stale versions of your content.
    If the content on the origin server is updated, but the cache on CDN PoPs is not refreshed and is still valid, the cache will be returned to users. You can purge the cache manually.
    1. Log in to Huawei Cloud console. Choose Service List > Content Delivery & Edge Computing > Content Delivery Network. In the navigation pane, choose Prefetch & Purge. On the Purge tab, purge the cache.
    2. Call the cache purge or prefetch API to purge the cache. For details, see API Reference.
  4. Check whether the origin server stores different versions of files.
    • Your origin server uses load balancing. There are multiple servers at the backend, and they store different versions of files.
    • A standby origin server is added on the CDN console, but files stored on the primary and standby servers are different.

    If the fault is caused by either of the preceding reasons, store the same version of files on your servers.

  5. Check whether the content is hijacked.

    If the content is hijacked, configure HTTPS to enhance security. Common hijacks are as follows:

    • When you visit a website, 302 is returned, but the address specified by location in the response is not the desired one. Enter the URL to be accessed in the address bar of Google Chrome, press F12, click the Network tab, and click a resource. On the displayed Headers tab, find location under Response Headers to check its value.
    • When you visit a website, the content displayed is not the desired content.

If the fault persists even after taking the previous steps, submit a service ticket.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback