search
HomeBackend DevelopmentPHP TutorialDetailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial

Meta http-equiv attribute detailed explanation (translated), metahttp-equiv

http-equiv, as the name suggests, is equivalent to the file header function of http. It can return some useful information to the browser. information to help display web page content correctly and accurately. The corresponding attribute value is content. The content in content is actually the variable value of each parameter.

Quote The syntax format of the http-equiv attribute of the meat tag is: ; the http-equiv attribute mainly has the following parameters:



1. Expires

Description: Can be used to set the expiration time of the web page. Once a web page expires, it must be retransmitted to the server.
Usage:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="expires" content="Wed, 20 Jun 2007 22:33:00 GMT">


Note: GMT time format must be used.

2. Pragma (cache mode)
Description: It is used to set up to prohibit the browser from accessing page content from the cache of the local machine. Once you leave the webpage after setting, Cannot be retrieved from Cache
Usage:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="Pragma" content="no-cache">


Note: With this setting, visitors will not be able to browse offline.

3. Refresh
Description: Automatically refresh and point to a new page.
Usage:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="Refresh" content="2;URL=http://www.net.cn/">


Note: The 2 refers to automatically refreshing to the URL after staying for 2 seconds.

4. Set-Cookie (cookie setting)

Note: If the web page expires, the saved cookies will be deleted.
Usage:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="Set-Cookie" content="cookievalue=xxx;expires=Wednesday, 20-Jun-2007 22:33:00 GMT; path =">


Note: GMT time format must be used.

5. Window-target (display window setting)
Description: Force the page to be displayed as an independent page in the current window.
Usage:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="Window-target" content="_top">


Note: Used to prevent others from calling your own page in the frame.

6. content-Type (display character set setting)
Description: Set the character set used by the page.
Usage:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="content-Type" content="text/html; charset=gb2312">



7. Pics-label (webpage rating)
Usage:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="Pics-label" contect="">


Note: There is a content setting in IE's internet options that can prevent browsing of some restricted websites, and the restriction level of the website is set through the meta attribute.

8. Page_Enter, Page_Exit
Set special effects when entering the page

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="Page-Enter" contect="revealTrans(duration=1.0,transtion= 12)"


Set special effects when leaving the page

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="Page-Exit" contect="revealTrans(duration=1.0,transtion= 12)"



The value of Duration is the time for dynamic transition of the web page, in seconds.
Transition is the transition method, its value is 0 to 23, corresponding to 24 transition methods. As shown in the table below:
0 Box-shaped contraction 1 Box-shaped radiation
2 Circular shrinkage 3 Circular radiation
4 From bottom to top 5 From top to bottom
6 From left to right 7 From right to Left
8 Vertical blinds 9 Horizontal blinds
10 Horizontal grid blinds 11 Vertical grid blinds
12 Dissolve at will 13 Expand from the left and right ends to the middle
14 Expand from the middle to the left and right ends 15 From Expand from the upper and lower ends to the middle
16 Expand from the middle to the upper and lower ends 17 Expand from the upper right corner to the lower left corner
18 Expand from the lower right corner to the upper left corner 19 Expand from the upper left corner to the lower right corner
20 From the lower left Expand the corner to the upper right corner 21 Horizontal linear expansion
22 Vertical linear expansion 23 Randomly generate a transition method

9. Clear cache (re-download when visiting this website again!)

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="cache-control" content="no-cache">



10. Set the expiration time of the web page

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="expires" content="0">



11. Keywords, used by search engines

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="keywords" content="keyword1,keyword2,keyword3">



12. Page description

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
    1. meta http-equiv="description" content="This is my page">

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1065326.htmlTechArticleMeta http-equiv attribute detailed explanation (transfer), metahttp-equiv http-equiv, as the name suggests, is equivalent to the file header of http Function, it can return some useful information to the browser to help correct and accurate...
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
PHP Performance Tuning for High Traffic WebsitesPHP Performance Tuning for High Traffic WebsitesMay 14, 2025 am 12:13 AM

ThesecrettokeepingaPHP-poweredwebsiterunningsmoothlyunderheavyloadinvolvesseveralkeystrategies:1)ImplementopcodecachingwithOPcachetoreducescriptexecutiontime,2)UsedatabasequerycachingwithRedistolessendatabaseload,3)LeverageCDNslikeCloudflareforservin

Dependency Injection in PHP: Code Examples for BeginnersDependency Injection in PHP: Code Examples for BeginnersMay 14, 2025 am 12:08 AM

You should care about DependencyInjection(DI) because it makes your code clearer and easier to maintain. 1) DI makes it more modular by decoupling classes, 2) improves the convenience of testing and code flexibility, 3) Use DI containers to manage complex dependencies, but pay attention to performance impact and circular dependencies, 4) The best practice is to rely on abstract interfaces to achieve loose coupling.

PHP Performance: is it possible to optimize the application?PHP Performance: is it possible to optimize the application?May 14, 2025 am 12:04 AM

Yes,optimizingaPHPapplicationispossibleandessential.1)ImplementcachingusingAPCutoreducedatabaseload.2)Optimizedatabaseswithindexing,efficientqueries,andconnectionpooling.3)Enhancecodewithbuilt-infunctions,avoidingglobalvariables,andusingopcodecaching

PHP Performance Optimization: The Ultimate GuidePHP Performance Optimization: The Ultimate GuideMay 14, 2025 am 12:02 AM

ThekeystrategiestosignificantlyboostPHPapplicationperformanceare:1)UseopcodecachinglikeOPcachetoreduceexecutiontime,2)Optimizedatabaseinteractionswithpreparedstatementsandproperindexing,3)ConfigurewebserverslikeNginxwithPHP-FPMforbetterperformance,4)

PHP Dependency Injection Container: A Quick StartPHP Dependency Injection Container: A Quick StartMay 13, 2025 am 12:11 AM

APHPDependencyInjectionContainerisatoolthatmanagesclassdependencies,enhancingcodemodularity,testability,andmaintainability.Itactsasacentralhubforcreatingandinjectingdependencies,thusreducingtightcouplingandeasingunittesting.

Dependency Injection vs. Service Locator in PHPDependency Injection vs. Service Locator in PHPMay 13, 2025 am 12:10 AM

Select DependencyInjection (DI) for large applications, ServiceLocator is suitable for small projects or prototypes. 1) DI improves the testability and modularity of the code through constructor injection. 2) ServiceLocator obtains services through center registration, which is convenient but may lead to an increase in code coupling.

PHP performance optimization strategies.PHP performance optimization strategies.May 13, 2025 am 12:06 AM

PHPapplicationscanbeoptimizedforspeedandefficiencyby:1)enablingopcacheinphp.ini,2)usingpreparedstatementswithPDOfordatabasequeries,3)replacingloopswitharray_filterandarray_mapfordataprocessing,4)configuringNginxasareverseproxy,5)implementingcachingwi

PHP Email Validation: Ensuring Emails Are Sent CorrectlyPHP Email Validation: Ensuring Emails Are Sent CorrectlyMay 13, 2025 am 12:06 AM

PHPemailvalidationinvolvesthreesteps:1)Formatvalidationusingregularexpressionstochecktheemailformat;2)DNSvalidationtoensurethedomainhasavalidMXrecord;3)SMTPvalidation,themostthoroughmethod,whichchecksifthemailboxexistsbyconnectingtotheSMTPserver.Impl

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),