小编Tim*_*rov的帖子

在.remove()之后图像对象是否保留在RAM中?

我有一个网站,有很多大照片总是在html中设置.喜欢

<div><img src="sample1.jpg"></div>
<div><img src="sample2.jpg"></div>
<div><img src="sample3.jpg"></div>
<div><img src="sample4.jpg"></div>
....
Run Code Online (Sandbox Code Playgroud)

这使得网站非常慢.即使.animate()函数也可以解决问题.所以我决定只加载5张图片,其他图片根据要求加载.问题是当加载的图像太多时,网站会再次变慢.题:

如果我使用.remove()函数删除正在显示的图像周围的所有图像,图像是否仍然保留在RAM中,或者当我添加图像时它们将被删除并从缓存中再次拍摄?

希望问题很清楚,先谢谢.

ram jquery image photos

6
推荐指数
1
解决办法
346
查看次数

如何使用schema.org设置Review-aggregate?

我有一个项目 - http://preloaders.net.我已对其进行设置,以便在Google搜索中显示评级(标题下方的橙色星标,例如尝试输入预加载器微调器关键字).一切都运行正常,除了主页,因为我刚修好它.

我现在将整个标记重新编码为HTML5(我很新),并使用schema.org并将所有产品包含在整个模式中,但我不知道schema.org中的Review-aggregate的替代品是什么,所以我正在尝试WebPage.Google网站管理员不会显示错误,但问题是:以下代码是否仍会显示明星或我应该执行其他操作?

<!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>my title</title>
    </head>

    <body>
        <nav>
            <a href=""></a>
        </nav>
        <main>
            <section>
                <h1>AJAX LOADERS</h1>
                <article itemscope itemtype="http://schema.org/Product">
                    <figure>
                        <img itemprop="image" src="/preloader.gif" alt="">
                        <figcaption itemprop="description">
                            Spinning Christmas tree with balls.
                        </figcaption>
                    </figure>
                    <a href="#" title="#" itemprop="url">
                        <h3 itemprop="name">3D Christmas tree </h3>
                    </a>
                    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
                        <span itemprop="priceCurrency" content="USD">$</span><span class="price" itemprop="price">2.95</span>
                    </div>
                    <div class="favorite"></div>
                    <div class="add-to-cart"></div>
                    <div class="frames-amount">30 fr</div>
                    <div class="dimensions">256x256</div>
                    <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
                        Average Rating: <span itemprop="ratingValue">5</span>
                        Votes: <span itemprop="ratingCount">12</span> …
Run Code Online (Sandbox Code Playgroud)

html5 google-search schema.org

6
推荐指数
1
解决办法
870
查看次数

wordpress:如何为帖子添加层次结构

我正在 wordpress 平台上创建一个网站,我希望能够在其中发布我自己的书籍文本。所以我想要的是有一种层次结构,我可以在其中添加一个帖子,然后向其中添加子项(章节)。我找到了这个:

register_post_type( 'post', array(
        'labels' => array(
            'name_admin_bar' => _x( 'Post', 'add new on admin bar' ),
        ),
        'public'  => true,
        '_builtin' => true, /* internal use only. don't use this when registering your own post type. */
        '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
        'capability_type' => 'post',
        'map_meta_cap' => true,
        'hierarchical' => false,
        'rewrite' => false,
        'query_var' => false,
        'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', …
Run Code Online (Sandbox Code Playgroud)

wordpress post hierarchy

5
推荐指数
3
解决办法
2万
查看次数

CKEditor - 如何禁用pastefromword

这个是杀了我.我一个小时都找不到解决方案.问题是 - 如何在CKEditor中完全禁用pastefromword?我希望粘贴的文本是明确的 - 根本不编辑.

提前致谢.

ckeditor

4
推荐指数
1
解决办法
5445
查看次数

tar文件保留完整路径.怎么阻止它?

我试图通过PHP在我的服务器上创建一个tar存档,如下所示:

exec('tar -cvf myfile.tar tmp_folder/innerfolder /');

它工作正常,但保存的文件保留了完整的路径,包括tmp_folder/innerfolder /我正在为用户动态创建它们,因此用户在提取时有这个路径有点无法使用.我已经回顾了这个主题 - 如何在使用TAR归档时去除路径,但在解释中,这个人没有给出一个例子,我不太明白该怎么做.

请告诉我一个例子,如何以不保留存档中'tmp_folder/innerfolder /'部分的方式将文件添加到tar?

提前致谢

php tar

2
推荐指数
1
解决办法
9014
查看次数

通过htaccess将HTTP重定向到https:重定向错误不正确

我需要所有http来重定向https:

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^some-domain\.com$ [NC]
RewriteRule ^(.*)$ https://some-domain.com/$1 [R=301,L]

RewriteCond %{THE_REQUEST} /(\.+) [OR]
RewriteCond %{THE_REQUEST} /(\?+) [OR]
RewriteCond %{THE_REQUEST} /(/+)
RewriteRule ^(.*)$ 404.html [L]
RewriteRule ^core/(install|temp|smarty|modules|languages|includes|functions|fonts|files|config|classes|cache|backup|tpl)/(.*) - [F]
RewriteRule ^data/(.+)\.(tpl\.html|php|php3|php4|php5|phtml|pl|cgi) - [F]
RewriteRule ^install_check\.html$ install.php?check=yes [L]
RewriteRule ^index\.html$ index.php [L]
RewriteRule ^news\.html$ index.php?news=yes [L]
RewriteRule ^price\.html$ index.php?show_price=yes [L]
RewriteRule ^cart\.html$ index.php?shopping_cart=yes [L]
RewriteRule ^wide_search\.html$ index.php?search_with_change_category_ability=yes [L]
RewriteRule ^feedback\.html$ index.php?feedback=yes [L]
RewriteRule ^compare\.html$ index.php?comparison_products=yes [L]
RewriteRule ^page_([0-9]+)\.html$ index.php?show_aux_page=$1 [L]
RewriteRule ^product_([0-9]+)\.html$ index.php?productID=$1 [L]
RewriteRule ^category_([0-9]+)\.html$ index.php?categoryID=$1 [L] …
Run Code Online (Sandbox Code Playgroud)

.htaccess https http

2
推荐指数
1
解决办法
1054
查看次数

标签 统计

.htaccess ×1

ckeditor ×1

google-search ×1

hierarchy ×1

html5 ×1

http ×1

https ×1

image ×1

jquery ×1

photos ×1

php ×1

post ×1

ram ×1

schema.org ×1

tar ×1

wordpress ×1