seo_cache 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +7 -1
- data/lib/seo_cache/page_render.rb +1 -1
- data/lib/seo_cache/version.rb +1 -1
- data/lib/seo_cache.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb604d6d47c1bca3fe043bee428fc5cb47f2fceb2dd294123633445fd17e7f97
|
4
|
+
data.tar.gz: cbd23a3cb8dee565f31b29344f48c78c55cd791efd197e1d6572ff632ca7e2cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 074ee0b620c01f5e0a6214c5716105de620e92c5faacc09e79ccdad46335a4b57480c6e5ffb2d45c6494741cff1d3c3a85d93243148efd96a329339dfc8cbbd7
|
7
|
+
data.tar.gz: 1df789afdffccaa5c29d276ae9f879bfdad75b885ceabc533c598ac20bd40c32d87c6565c40a951bd6d83d47bbad756c85fd4f0ad4ae22afc547a179d72448ad
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -142,7 +142,13 @@ Parameter added to URL when generating the page, avoid infinite rendering (overr
|
|
142
142
|
SeoCache.prerender_url_param = '_prerender_'
|
143
143
|
```
|
144
144
|
|
145
|
-
|
145
|
+
If you encounter the following error `DevToolsActivePort file doesn't exist`, you can add the following option:
|
146
|
+
|
147
|
+
```ruby
|
148
|
+
SeoCache.chrome_debugging_port = '9222'
|
149
|
+
```
|
150
|
+
|
151
|
+
Be aware, JS will be rendered twice: once by server rendering and once by client. For React, this not a problem but with jQuery plugins, it can duplicate elements in the page (you have to check the redundancy).
|
146
152
|
|
147
153
|
Disk cache is recommended by default. Nginx will directly fetch file on disk. The TTFB (time to first byte) will be under 200ms :). You can use memory cache if you have lot of RAM.
|
148
154
|
|
@@ -44,7 +44,7 @@ module SeoCache
|
|
44
44
|
browser_options.args << '--disable-notifications'
|
45
45
|
browser_options.args << '--disable-sync'
|
46
46
|
browser_options.args << '--window-size=1920x1080'
|
47
|
-
|
47
|
+
browser_options.args << "--remote-debugging-port=#{SeoCache.chrome_debugging_port}" if SeoCache.chrome_debugging_port
|
48
48
|
@driver = ::Selenium::WebDriver.for(:chrome, options: browser_options)
|
49
49
|
end
|
50
50
|
end
|
data/lib/seo_cache/version.rb
CHANGED
data/lib/seo_cache.rb
CHANGED
@@ -66,6 +66,10 @@ module SeoCache
|
|
66
66
|
mattr_accessor :cache_only_status
|
67
67
|
self.cache_only_status = [200]
|
68
68
|
|
69
|
+
# Default port used by Chrome: 9222
|
70
|
+
mattr_accessor :chrome_debugging_port
|
71
|
+
self.chrome_debugging_port = false
|
72
|
+
|
69
73
|
mattr_accessor :extensions_to_ignore
|
70
74
|
self.extensions_to_ignore = %w[.js .css .xml .less .png .jpg .jpeg .gif .pdf .doc .txt .ico .rss .zip .mp3 .rar .exe .wmv .doc .avi .ppt .mpg .mpeg .tif .wav .mov .psd .ai .xls .mp4 .m4a .swf .dat .dmg .iso .flv .m4v .torrent .woff2 .woff .gz .ttf .svg]
|
71
75
|
|